chore: move execution of setupFiles to jest-runner#9596
chore: move execution of setupFiles to jest-runner#9596SimenB merged 2 commits intojestjs:masterfrom
setupFiles to jest-runner#9596Conversation
|
|
||
| const start = Date.now(); | ||
|
|
||
| config.setupFiles.forEach(path => runtime!.requireModule(path)); |
There was a problem hiding this comment.
I do this up here since it happened in the constructor previously. However, I wonder if it makes more sense to do it after we call the environment's setup function further down? If not, maybe right before? Seems like they belong together
There was a problem hiding this comment.
We can mark it as a todo for later, to group similar features together. However for now, to avoid unintended breakages, I'd stay with what's closer to previous version
| import setGlobal from './setGlobal'; | ||
| import deepCyclicCopy from './deepCyclicCopy'; | ||
| import convertDescriptorToString from './convertDescriptorToString'; | ||
| export {default as clearLine} from './clearLine'; |
Codecov Report
@@ Coverage Diff @@
## master #9596 +/- ##
=========================================
+ Coverage 65.08% 65.1% +0.01%
=========================================
Files 286 286
Lines 12144 12141 -3
Branches 3008 3007 -1
=========================================
Hits 7904 7904
+ Misses 3605 3603 -2
+ Partials 635 634 -1
Continue to review full report at Codecov.
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Since ESM is asynchronous we cannot run this as part of
jest-runtime's constructor.This is technically a breaking change, but I'd be hugely surprised if someone either uses a custom runtime or uses
jest-runtimedirectly. Can hold off on merging until Jest 26 changes start landing, but that'll make it impossible to land any kind of support for ESM insetupFiles. Maybe not a biggie 🙂Test plan
Green CI