From db262ff01b53bbbce90b896b4b7856ac9fd4c68f Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Sun, 3 Aug 2025 23:33:24 +0000 Subject: [PATCH] Fix test: rename fake-xdg-open to xdg-open to ensure proper interception The test was creating a fake executable called 'fake-xdg-open' but our browser opening code looks for 'xdg-open'. Fixed the test to create the executable with the correct name so it gets intercepted properly. --- test/cli/inspect-browser.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cli/inspect-browser.test.ts b/test/cli/inspect-browser.test.ts index 59368ee16b..6ac276fc5c 100644 --- a/test/cli/inspect-browser.test.ts +++ b/test/cli/inspect-browser.test.ts @@ -5,13 +5,13 @@ import { join } from "path"; test("--inspect-browser should open browser and wait for connection", async () => { const dir = tempDirWithFiles("inspect-browser-test", { "test.js": `console.log("Hello from debugger test");`, - "fake-xdg-open": `#!/bin/bash + "xdg-open": `#!/bin/bash echo "Opening $1" > xdg-open-calls.txt exit 0`, }); // Make the fake xdg-open executable - await Bun.spawn(["chmod", "+x", join(dir, "fake-xdg-open")], { + await Bun.spawn(["chmod", "+x", join(dir, "xdg-open")], { cwd: dir, }).exited; @@ -60,13 +60,13 @@ exit 0`, test("--inspect-browser with custom port should work", async () => { const dir = tempDirWithFiles("inspect-browser-port-test", { "test.js": `console.log("Hello from debugger test");`, - "fake-xdg-open": `#!/bin/bash + "xdg-open": `#!/bin/bash echo "Opening $1" > xdg-open-calls.txt exit 0`, }); // Make the fake xdg-open executable - await Bun.spawn(["chmod", "+x", join(dir, "fake-xdg-open")], { + await Bun.spawn(["chmod", "+x", join(dir, "xdg-open")], { cwd: dir, }).exited;