fix: format executable test

This commit is contained in:
Mohamed Boudra
2026-04-13 21:05:08 +07:00
parent bdb300b919
commit 7ef47e9193

View File

@@ -149,7 +149,9 @@ describe("findExecutable", () => {
); );
}); });
test.skipIf(process.platform === "win32")("warns and returns null when the final which line is not an absolute path", async () => { test.skipIf(process.platform === "win32")(
"warns and returns null when the final which line is not an absolute path",
async () => {
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {}); const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
const { findExecutable } = await loadExecutableModule({ const { findExecutable } = await loadExecutableModule({
execFileImpl: (_command, _args, _options, callback) => { execFileImpl: (_command, _args, _options, callback) => {
@@ -161,7 +163,8 @@ describe("findExecutable", () => {
expect(warnSpy).toHaveBeenCalledOnce(); expect(warnSpy).toHaveBeenCalledOnce();
warnSpy.mockRestore(); warnSpy.mockRestore();
}); },
);
test("returns null when which lookup fails", async () => { test("returns null when which lookup fails", async () => {
const { findExecutable } = await loadExecutableModule({ const { findExecutable } = await loadExecutableModule({