@@ -28,7 +28,7 @@ describe('Loader hooks throwing errors', { concurrency: true }, () => {
28
28
fixtures . fileURL ( '/es-module-loaders/hooks-custom.mjs' ) ,
29
29
'--input-type=module' ,
30
30
'--eval' ,
31
- `import ' ${ fixtures . fileURL ( '/es-modules/file.unknown' ) } ' ` ,
31
+ `import ${ JSON . stringify ( fixtures . fileURL ( '/es-modules/file.unknown' ) ) } ` ,
32
32
] ) ;
33
33
34
34
assert . match ( stderr , / E R R _ U N K N O W N _ F I L E _ E X T E N S I O N / ) ;
@@ -142,7 +142,7 @@ describe('Loader hooks throwing errors', { concurrency: true }, () => {
142
142
`import assert from 'node:assert';
143
143
await Promise.allSettled([
144
144
import('nonexistent/file.mjs'),
145
- import(' ${ fixtures . fileURL ( '/es-modules/file.unknown' ) } ' ),
145
+ import(${ JSON . stringify ( fixtures . fileURL ( '/es-modules/file.unknown' ) ) } ),
146
146
import('esmHook/badReturnVal.mjs'),
147
147
import('esmHook/format.false'),
148
148
import('esmHook/format.true'),
@@ -170,7 +170,7 @@ describe('Loader hooks parsing modules', { concurrency: true }, () => {
170
170
'--input-type=module' ,
171
171
'--eval' ,
172
172
`import assert from 'node:assert';
173
- await import(' ${ fixtures . fileURL ( '/es-module-loaders/js-as-esm.js' ) } ' )
173
+ await import(${ JSON . stringify ( fixtures . fileURL ( '/es-module-loaders/js-as-esm.js' ) ) } )
174
174
.then((parsedModule) => {
175
175
assert.strictEqual(typeof parsedModule, 'object');
176
176
assert.strictEqual(parsedModule.namedExport, 'named-export');
@@ -191,7 +191,7 @@ describe('Loader hooks parsing modules', { concurrency: true }, () => {
191
191
'--input-type=module' ,
192
192
'--eval' ,
193
193
`import assert from 'node:assert';
194
- await import(' ${ fixtures . fileURL ( '/es-modules/file.ext' ) } ' )
194
+ await import(${ JSON . stringify ( fixtures . fileURL ( '/es-modules/file.ext' ) ) } )
195
195
.then((parsedModule) => {
196
196
assert.strictEqual(typeof parsedModule, 'object');
197
197
const { default: defaultExport } = parsedModule;
@@ -258,7 +258,7 @@ describe('Loader hooks parsing modules', { concurrency: true }, () => {
258
258
'--input-type=module' ,
259
259
'--eval' ,
260
260
`import assert from 'node:assert';
261
- await import(' ${ fixtures . fileURL ( '/es-modules/stateful.mjs' ) } ' )
261
+ await import(${ JSON . stringify ( fixtures . fileURL ( '/es-modules/stateful.mjs' ) ) } )
262
262
.then(({ default: count }) => {
263
263
assert.strictEqual(count(), 1);
264
264
});` ,
0 commit comments