Skip to content

Commit 3c80b74

Browse files
committed
Fix enzyme tests
Fixes codesandbox#866
1 parent 3545f89 commit 3c80b74

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/app/src/sandbox/eval/manager.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ export default class Manager {
490490

491491
this.cachedPaths[dirredPath][path] = resolvedPath;
492492

493+
if (resolvedPath === '//empty.js') {
494+
return SHIMMED_MODULE;
495+
}
496+
493497
if (!this.transpiledModules[resolvedPath]) {
494498
throw new Error(`Could not find '${resolvedPath}' in local files.`);
495499
}
@@ -524,11 +528,12 @@ export default class Manager {
524528
throw new DependencyNotFoundError(connectedPath, currentPath);
525529
}
526530
}
531+
}
527532

528-
if (resolvedPath === '//empty.js') {
529-
return SHIMMED_MODULE;
530-
}
533+
if (resolvedPath === '//empty.js') {
534+
return SHIMMED_MODULE;
531535
}
536+
532537
return this.transpiledModules[resolvedPath].module;
533538
}
534539

0 commit comments

Comments
 (0)