Fix: The test randomly throws exceptions related to module imports#14575
Closed
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
Closed
Fix: The test randomly throws exceptions related to module imports#14575liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52000/ |
Member
|
What breaks the environment? should restore everything to the state it was before running the tests. |
Member
Author
|
I do not know. It's worth mentioning that after applying the patch, I ran the CI 2*50 times without exception!💐 |
7021066 to
ed41e32
Compare
Member
Author
|
Well I still don't understand why the exception appears and why it disappears, but now this PR is no longer needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a Proof Of Concept and needs more discussion.
As I mentioned in #14541 (comment), this issue is best fixed by adding new features in
jest-light-runner.jest-light-runnerdoes not isolate tests, andpackages\babel-register\testbreaks the node built-in environment.Causes the remaining tests to randomly throw exceptions related to importing the module.
Maybe there are other issues in
babel-registerthat are contributing to this result, but that doesn't matter.