Versions 59 to 60
new file, 67 lines
1+// Opening the approve page in the person's browser: when it's skipped, which program opens it on each
3+
9+
11+
19+
20+test("no browser with ABSO_NO_BROWSER, over SSH, under CI, or on Linux without a display", () => {
22+ assert.equal(browserSkip({ SSH_CONNECTION: "10.0.0.2 51234 10.0.0.1 22" }, "darwin"), "this is an SSH session");
23+ assert.equal(browserSkip({ SSH_TTY: "/dev/pts/0", DISPLAY: ":0" }, "linux"), "this is an SSH session");
28+
30+ assert.deepEqual(openCommand(LINK, "win32"), ["rundll32", ["url.dll,FileProtocolHandler", LINK]]);
34+
38+ for (const bad of ["file:///C:/Windows/System32/calc.exe", "javascript:alert(1)", "C:\\x.exe", "not a link", ""])
41+
48+ if (fail === "error") queueMicrotask(() => child.emit("error", new Error("spawn xdg-open ENOENT")));
52+
53+test("openInBrowser starts the opener without waiting on it, and a failure is silent", async () => {
59+
63+
- MCP
- compare on this site's /mcp
- CLI
- abso diff 59 60 client/test/open-browser.test.ts --json
- JSON
- /christopher/abso-core/compare/59..60?file=client%2Ftest%2Fopen-browser.test.ts&format=json