Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Commit 16c2552

Browse files
authored
Fix test:api on windows (#4917)
1 parent 1a6eceb commit 16c2552

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎Herebyfile.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,8 @@ async function runTestTools() {
814814
}
815815

816816
async function runTestAPI() {
817-
await $`npm run -w @typescript/native-preview test:only`;
817+
// 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
818+
await _$({ verbose: "short", stdio: "inherit", cwd: "./_packages/native-preview" })`node --experimental-strip-types --no-warnings --conditions @typescript/source --test ./test/**/*.test.ts`;
818819
}
819820

820821
export const testTools = task({

‎_packages/native-preview/test/async/api.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe("API", () => {
106106
assert.deepEqual(commandLine.fileNames, ["/src/index.ts"]);
107107
assert.equal(commandLine.options.strict, true);
108108
assert.equal(
109-
commandLine.options.outDir,
109+
resolve(commandLine.options.outDir!),
110110
resolve(fileURLToPath(new URL("../../../../", import.meta.url)), "dist"),
111111
);
112112
assert.deepEqual(commandLine.raw, {

‎_packages/native-preview/test/sync/api.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe("API", () => {
114114
assert.deepEqual(commandLine.fileNames, ["/src/index.ts"]);
115115
assert.equal(commandLine.options.strict, true);
116116
assert.equal(
117-
commandLine.options.outDir,
117+
resolve(commandLine.options.outDir!),
118118
resolve(fileURLToPath(new URL("../../../../", import.meta.url)), "dist"),
119119
);
120120
assert.deepEqual(commandLine.raw, {

0 commit comments

Comments
 (0)