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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Jest to version 24 (breaking changes) #13922
Upgrade Jest to version 24 (breaking changes) #13922
Changes from all commits
242e873
0935a4b
62ededb
4b59308
87051ee
2cbb31a
88c8cd7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? It's still referenced as an import:
gutenberg/packages/e2e-tests/config/setup-test-framework.js
Line 4 in 5cf3bb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it because, via jestjs/jest#7119 , we can trust it to be provided through the preset from
jest-puppeteer
as introduced by argos-ci/jest-puppeteer#196 ? In which case, we just need to remove the above import?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Jest doesn't merge
setupFIlesAfterEnv
values from preset and the config itself. It overrides instead:I will add
expect-puppeteer"
in the config explicitly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure whether we should include it in the
package.json
explicitly given that it is included injest-puppeteer
. It probably doesn't harm to do it. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific reference is a bit unique than a traditional
import
statement, but I'd prefer we err on the side of: If we reference it as a dependency anywhere, always define it as a dependency. I'd love to see some ESLint code enforcement around this too (i.e. if there's animport
in a package file, make sure the package declares that as a dependency).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, it's referenced in the config file and it repeats what was already provided in the preset:
gutenberg/packages/e2e-tests/jest.config.js
Line 8 in 88c8cd7
I think I will add it as a dependency just for consistency. It would be nicer if we could just include additional entries rather than repeat what was already listed in the preset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #14212.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapshotSerializers
- should be added to docs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We removed
pegjs
support a few months back :)