Skip to content

Commit f0a2506

Browse files
committed
test_runner: fix mock loader
1 parent 10b5b37 commit f0a2506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/test_runner/mock/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function createSourceFromMock(mock, format) {
139139
const { exportNames, hasDefaultExport, url } = mock;
140140
const useESM = format === 'module' || format === 'module-typescript';
141141
const source = `${testImportSource(useESM)}
142-
if (!$__test.mock._mockExports.has('${url}')) {
142+
if (!$__test.mock._mockExports.has(${JSONStringify(url)})) {
143143
throw new Error(${JSONStringify(`mock exports not found for "${url}"`)});
144144
}
145145

0 commit comments

Comments
 (0)