Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
TEST_TYPE_TS,
TS_DIR_PATH,
TS_ESTREE_DIR_PATH,
} from './parse-raw-common.js';
import { makeUnitsFromTest } from './typescript-make-units-from-test.js';
} from './parse-raw-common.ts';
import { makeUnitsFromTest } from './typescript-make-units-from-test.ts';

const { hasOwn } = Object,
{ isArray } = Array;
Expand Down
6 changes: 3 additions & 3 deletions napi/parser/test/parse-raw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
TS_ESTREE_DIR_PATH,
TS_SHORT_DIR_PATH,
TS_SNAPSHOT_PATH,
} from './parse-raw-common.js';
} from './parse-raw-common';

const { env } = process;
const isEnabled = envValue => envValue === 'true' || envValue === '1';
Expand All @@ -43,7 +43,7 @@ const [describeLazy, itLazy] = isEnabled(env.RUN_LAZY_TESTS)
// Worker pool for running test cases.
// Vitest provides parallelism across test files, but not across cases within a single test file.
// So we run each case in a worker to achieve parallelism.
const pool = new Tinypool({ filename: new URL('./parse-raw-worker.js', import.meta.url).href });
const pool = new Tinypool({ filename: new URL('./parse-raw-worker.ts', import.meta.url).href });

let runCase;

Expand All @@ -54,7 +54,7 @@ async function runCaseInWorker(type, props) {
// If test failed in worker, run it again in main thread with Vitest's `expect`,
// to get a nice diff and stack trace
if (!success) {
if (!runCase) ({ runCase } = await import('./parse-raw-worker.js'));
if (!runCase) ({ runCase } = await import('./parse-raw-worker.ts'));

type |= TEST_TYPE_PRETTY;
await runCase({ type, props }, expect);
Expand Down
3 changes: 2 additions & 1 deletion napi/parser/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmit": true,
"target": "ESNext"
"target": "ESNext",
"allowImportingTsExtensions": true
}
}
Loading