From cd465435917ccbdb6768f89728ddfea538c4f166 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 19 Aug 2026 15:04:49 -0700 Subject: [PATCH 1/2] Fix test:api on windows --- Herebyfile.mjs | 3 ++- _packages/native-preview/test/async/api.test.ts | 2 +- _packages/native-preview/test/sync/api.test.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Herebyfile.mjs b/Herebyfile.mjs index eb170f03554..6fe27c05882 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -808,7 +808,8 @@ async function runTestTools() { } async function runTestAPI() { - await $`npm run -w @typescript/native-preview test:only`; + // await $`npm run -w @typescript/native-preview test:only`; // doesn't work on windows - some path escaping isn't done correctly, test runner runs no tests + await _$({ verbose: "short", stdio: "inherit", cwd: "./_packages/native-preview" })`node --experimental-strip-types --no-warnings --conditions @typescript/source --test ./test/**/*.test.ts` } export const testTools = task({ diff --git a/_packages/native-preview/test/async/api.test.ts b/_packages/native-preview/test/async/api.test.ts index 2720784a624..9c5564a83a1 100644 --- a/_packages/native-preview/test/async/api.test.ts +++ b/_packages/native-preview/test/async/api.test.ts @@ -106,7 +106,7 @@ describe("API", () => { assert.deepEqual(commandLine.fileNames, ["/src/index.ts"]); assert.equal(commandLine.options.strict, true); assert.equal( - commandLine.options.outDir, + resolve(commandLine.options.outDir!), resolve(fileURLToPath(new URL("../../../../", import.meta.url)), "dist"), ); assert.deepEqual(commandLine.raw, { diff --git a/_packages/native-preview/test/sync/api.test.ts b/_packages/native-preview/test/sync/api.test.ts index 5a7c27b1c82..85aff333f1a 100644 --- a/_packages/native-preview/test/sync/api.test.ts +++ b/_packages/native-preview/test/sync/api.test.ts @@ -114,7 +114,7 @@ describe("API", () => { assert.deepEqual(commandLine.fileNames, ["/src/index.ts"]); assert.equal(commandLine.options.strict, true); assert.equal( - commandLine.options.outDir, + resolve(commandLine.options.outDir!), resolve(fileURLToPath(new URL("../../../../", import.meta.url)), "dist"), ); assert.deepEqual(commandLine.raw, { From cf033edf7f28b17a80f8e5dcce291fd9c3ecba3f Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 19 Aug 2026 15:11:16 -0700 Subject: [PATCH 2/2] Semicolon --- Herebyfile.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Herebyfile.mjs b/Herebyfile.mjs index 6fe27c05882..820bc3371cb 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -809,7 +809,7 @@ async function runTestTools() { async function runTestAPI() { // await $`npm run -w @typescript/native-preview test:only`; // doesn't work on windows - some path escaping isn't done correctly, test runner runs no tests - await _$({ verbose: "short", stdio: "inherit", cwd: "./_packages/native-preview" })`node --experimental-strip-types --no-warnings --conditions @typescript/source --test ./test/**/*.test.ts` + await _$({ verbose: "short", stdio: "inherit", cwd: "./_packages/native-preview" })`node --experimental-strip-types --no-warnings --conditions @typescript/source --test ./test/**/*.test.ts`; } export const testTools = task({