File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -186,3 +186,37 @@ test('DOM has no scope', async () => {
186
186
await page . close ( ) ;
187
187
} ) ;
188
188
189
+
190
+ test . only ( 'nested mjs import' , async ( ) => {
191
+
192
+ const { page, output } = await createPage ( {
193
+ files : {
194
+ ...defaultFiles ,
195
+ '/component.vue' : `
196
+ <script>
197
+ import { test } from './foo/test.mjs'
198
+ console.log( test() );
199
+ </script>
200
+ ` ,
201
+
202
+ '/foo/test.mjs' : `
203
+ export function test() {
204
+
205
+ return require('../bar/test.mjs').test();
206
+ }
207
+ ` ,
208
+
209
+ '/bar/test.mjs' : `
210
+ export function test() {
211
+
212
+ return 'test_ok';
213
+ }
214
+ `
215
+ }
216
+ } ) ;
217
+
218
+ await expect ( output . some ( e => e . type === 'log' && e . content [ 0 ] === 'test_ok' ) ) . toBe ( true ) ;
219
+
220
+ await page . close ( ) ;
221
+ } ) ;
222
+
You can’t perform that action at this time.
0 commit comments