@@ -30,6 +30,12 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
30
30
} ) ;
31
31
32
32
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 ( ) => {
33
39
const nodeProcess = await node . import ( importPath + query ) ;
34
40
assertResults ( nodeProcess . stdout ) ;
35
41
expect ( nodeProcess . stdout ) . toMatch ( '{"default":1234}' ) ;
@@ -49,6 +55,12 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
49
55
assertResults ( nodeProcess . stdout ) ;
50
56
expect ( nodeProcess . stdout ) . toMatch ( '{"default":1234}' ) ;
51
57
} ) ;
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
+ } ) ;
52
64
} ) ;
53
65
54
66
describe ( 'extensionless - should not work' , ( { test } ) => {
@@ -63,6 +75,11 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
63
75
const nodeProcess = await node . import ( importPath ) ;
64
76
assertNotFound ( nodeProcess . stderr , importPath ) ;
65
77
} ) ;
78
+
79
+ test ( 'Import with query' , async ( ) => {
80
+ const nodeProcess = await node . import ( importPath + query ) ;
81
+ assertNotFound ( nodeProcess . stderr , importPath ) ;
82
+ } ) ;
66
83
} ) ;
67
84
68
85
describe ( 'directory - should not work' , ( { test } ) => {
@@ -77,6 +94,11 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
77
94
const nodeProcess = await node . import ( importPath ) ;
78
95
assertNotFound ( nodeProcess . stderr , importPath ) ;
79
96
} ) ;
97
+
98
+ test ( 'Import with query' , async ( ) => {
99
+ const nodeProcess = await node . import ( importPath + query ) ;
100
+ assertNotFound ( nodeProcess . stderr , importPath ) ;
101
+ } ) ;
80
102
} ) ;
81
103
} ) ;
82
104
} ) ;
0 commit comments