We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd22413 commit a4bc638Copy full SHA for a4bc638
1 file changed
test/unit/container_test.js
@@ -184,7 +184,13 @@ describe('Container', () => {
184
dummyPage: './data/dummy_page.js',
185
},
186
})
187
- const dummyPage = isWindows() ? await import(pathToFileURL('../data/dummy_page.js').href) : await import('../data/dummy_page.js')
+
188
+ const resolvedImportPath =
189
+ isWindows() && typeof '../data/dummy_page.js' === 'string' && path.isAbsolute('../data/dummy_page.js')
190
+ ? pathToFileURL('../data/dummy_page.js').href
191
+ : '../data/dummy_page.js'
192
193
+ const dummyPage = await import(resolvedImportPath)
194
expect(container.support('dummyPage').toString()).is.eql((dummyPage.default || dummyPage).toString())
195
196
0 commit comments