Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit fa634d7

Browse files
committed
wip
1 parent 8e058c6 commit fa634d7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/specs/typescript/mts.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
3030
});
3131

3232
test('Import', async () => {
33+
const nodeProcess = await node.import(importPath);
34+
assertResults(nodeProcess.stdout);
35+
expect(nodeProcess.stdout).toMatch('{"default":1234}');
36+
});
37+
38+
test('Import with query', async () => {
3339
const nodeProcess = await node.import(importPath + query);
3440
assertResults(nodeProcess.stdout);
3541
expect(nodeProcess.stdout).toMatch('{"default":1234}');
@@ -49,6 +55,12 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
4955
assertResults(nodeProcess.stdout);
5056
expect(nodeProcess.stdout).toMatch('{"default":1234}');
5157
});
58+
59+
test('Import with query', async () => {
60+
const nodeProcess = await node.import(importPath + query, { typescript: true });
61+
assertResults(nodeProcess.stdout);
62+
expect(nodeProcess.stdout).toMatch('{"default":1234}');
63+
});
5264
});
5365

5466
describe('extensionless - should not work', ({ test }) => {
@@ -63,6 +75,11 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
6375
const nodeProcess = await node.import(importPath);
6476
assertNotFound(nodeProcess.stderr, importPath);
6577
});
78+
79+
test('Import with query', async () => {
80+
const nodeProcess = await node.import(importPath + query);
81+
assertNotFound(nodeProcess.stderr, importPath);
82+
});
6683
});
6784

6885
describe('directory - should not work', ({ test }) => {
@@ -77,6 +94,11 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
7794
const nodeProcess = await node.import(importPath);
7895
assertNotFound(nodeProcess.stderr, importPath);
7996
});
97+
98+
test('Import with query', async () => {
99+
const nodeProcess = await node.import(importPath + query);
100+
assertNotFound(nodeProcess.stderr, importPath);
101+
});
80102
});
81103
});
82104
});

0 commit comments

Comments
 (0)