Skip to content

Commit fec54fc

Browse files
committed
Fix test files not updating automatically
1 parent 1620517 commit fec54fc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -726,17 +726,14 @@ export default class Manager {
726726
])
727727
);
728728
const transpiledModulesToUpdate = allModulesToUpdate.filter(
729-
m => !TestRunner.isTest(m.module.path)
729+
m => !m.isTestFile
730730
);
731731

732732
// Reset test files, but don't transpile. We want to do that in the test runner
733733
// so we can catch any errors
734-
allModulesToUpdate
735-
.filter(m => TestRunner.isTest(m.module.path))
736-
.forEach(m => {
737-
m.setIsTestFile(true);
738-
m.resetTranspilation();
739-
});
734+
allModulesToUpdate.filter(m => m.isTestFile).forEach(m => {
735+
m.resetTranspilation();
736+
});
740737

741738
debug(
742739
`Generated update diff, updating ${

packages/app/src/sandbox/eval/transpiled-module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ export default class TranspiledModule {
300300
shouldTranspile() {
301301
return (
302302
!this.source &&
303+
!this.isTestFile &&
303304
!(this.initiators.size === 0 && this.transpilationInitiators.size > 0)
304305
);
305306
}

0 commit comments

Comments
 (0)