Bug: Fix issue with jest projects matching ui/node_modules
#20601
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.
Issue:
(1) sometimes tests come up twice, both within a project and at the root. They fail in the latter with babel problems
Also there are a bunch of warnings like:
(2) sometimes jest fails completely complaining about duplicate project paths.
The issue comes from the
projects
field matching folders with nojest.config.js
. I've seen two so far:code/ui/node_modules
- there's a.cache
in there from running our internal SB.addons/storyshots
- this was recently renamed and sometimes gets left hanging out by git when you switch branches.What I did
Ignored the first folder with a glob.
I assume the second problem will go away by itself, I mention it here just in case anyone gets the same issue, so they know to just delete it.
How to test
Run
yarn test