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 10b5b37 commit f0a2506Copy full SHA for f0a2506
lib/internal/test_runner/mock/loader.js
@@ -139,7 +139,7 @@ async function createSourceFromMock(mock, format) {
139
const { exportNames, hasDefaultExport, url } = mock;
140
const useESM = format === 'module' || format === 'module-typescript';
141
const source = `${testImportSource(useESM)}
142
-if (!$__test.mock._mockExports.has('${url}')) {
+if (!$__test.mock._mockExports.has(${JSONStringify(url)})) {
143
throw new Error(${JSONStringify(`mock exports not found for "${url}"`)});
144
}
145
0 commit comments