From 692d4777c6d07ada84e6752f3f65f5bb822a2c48 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 15 Aug 2026 00:34:42 +0200 Subject: [PATCH] style(workspaces): format Windows helper test --- .../test/command-resolution.test.mjs | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/workspace-helper/test/command-resolution.test.mjs b/packages/workspace-helper/test/command-resolution.test.mjs index adfa21dbd2..ad3ea4860e 100644 --- a/packages/workspace-helper/test/command-resolution.test.mjs +++ b/packages/workspace-helper/test/command-resolution.test.mjs @@ -10,24 +10,21 @@ import { expect, test } from "vitest"; const run = promisify(execFile); const workspaceHelper = fileURLToPath(new URL("../src/executable.mjs", import.meta.url)); -test.runIf(process.platform === "win32")( - "Windows command resolution honors PATHEXT", - async () => { - const root = await mkdtemp(path.join(tmpdir(), "paseo-helper-windows-command-")); - try { - const executable = path.join(root, "paseo-pathext-fixture.CMD"); - await writeFile(executable, "@exit /b 0\r\n"); - const result = await run( - process.execPath, - [workspaceHelper, "resolve-command", "--name", "paseo-pathext-fixture"], - { - cwd: root, - env: { ...process.env, PATH: root, PATHEXT: ".COM;.EXE;.BAT;.CMD" }, - }, - ); - expect(JSON.parse(result.stdout)).toEqual({ path: await realpath(executable) }); - } finally { - await rm(root, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); - } - }, -); +test.runIf(process.platform === "win32")("Windows command resolution honors PATHEXT", async () => { + const root = await mkdtemp(path.join(tmpdir(), "paseo-helper-windows-command-")); + try { + const executable = path.join(root, "paseo-pathext-fixture.CMD"); + await writeFile(executable, "@exit /b 0\r\n"); + const result = await run( + process.execPath, + [workspaceHelper, "resolve-command", "--name", "paseo-pathext-fixture"], + { + cwd: root, + env: { ...process.env, PATH: root, PATHEXT: ".COM;.EXE;.BAT;.CMD" }, + }, + ); + expect(JSON.parse(result.stdout)).toEqual({ path: await realpath(executable) }); + } finally { + await rm(root, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); + } +});