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.
Applying #13559 step by step to not face gigantic conflicts or issues with the webpack 4/5 works.
What I did
Previously the unit tests were run with a custom script
scripts/test.js
.This script was a kind of wrapper around Jest, handling just a few options (skipping all the unknown ones) and spawning Jest programmatically.
To simplify this process:
yarn test-puppeteer
yarn test
so all the options are forwarded properly to Jest.yarn test --core
doesn't work anymore as--core
isn't a Jest option, it is now simplyyarn test
. All the other options are still available:--watch
--coverage
--runInBand
--w2
is now -->-w 2
--reportLeaks
is now -->--detectLeaks
--update
is now -->-u
or--updateSnapshot
📝 We can now run the tests of a single workspace by simply use
--projects
, for instance:yarn test --projects examples/angular-cli
I also updated:
yarn test --core
byyarn test
--runInBand --ci
, for details see https://jestjs.io/docs/en/cli#--ciHow to test
yarn test
with any Jest option.