Skip to content

Commit cd46543

Browse files
committed
Fix test:api on windows
1 parent 65535b2 commit cd46543

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
@@ -808,7 +808,8 @@ async function runTestTools() {
808808
}
809809

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

814815
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)