Skip to content
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

chore: bump Jest to v26 #12190

Merged
merged 2 commits into from Oct 30, 2020
Merged

chore: bump Jest to v26 #12190

merged 2 commits into from Oct 30, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Oct 15, 2020

Q                       A
Any Dependency Changes? Bumped Jest to v26, but test node 6&8 on Jest 24.
License MIT

This PR bumps Jest to v26. Since v26 drops Node.js 8 support, we downgrade Jest to v24 on Node 6/8 CI.

@JLHwung JLHwung added PR: Internal 🏠 A type of pull request used for our changelog categories PR: Dependency ⬆️ labels Oct 15, 2020
@babel-bot
Copy link
Collaborator

babel-bot commented Oct 15, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/31392/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 15, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit be4c26a:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@@ -35,7 +35,6 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"babel-jest": "^24.9.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove babel-jest because jest-config always load babel-jest and we are not using babel-jest explicitly in jest config.

https://github.com/facebook/jest/blob/e84a70c8456d61daa36b5c79a4df7ee752d6d6d6/packages/jest-config/src/normalize.ts#L241

@nicolo-ribaudo
Copy link
Member

Is there any advantage in upgrading, since we have to stick to Jest 24 features anyway for compatibility?

@JLHwung
Copy link
Contributor Author

JLHwung commented Oct 16, 2020

@nicolo-ribaudo This PR is extracted from #11968. Jest 26 supports collecting coverage from v8: So we don't have to rebuild artifacts with istanbul when running coverage test. This is great for local development -- to see what is the popular path. However I can not get it working nicely with codecov, because we have to collect coverage from **/lib/**, which is not included in our git repo so codecov can not print the coverage report. It works nicely on local build. I will see if I can add yarn gulp test-dev-coverage in the future.

Jest 26 should be faster than v24 because it compiles to Node.js 10. I think we could use some Jest 26 features, -- just have to skip the test on Node.js 6 / 8.

Generally bumping Jest to v26 also ensure that we have tests running on Jest 26, eventually we will use Jest 26 on Babel 8, we can provide feedback earlier if any regression introduced, otherwise we may come across surprises when bumping Jest on Babel 8 in the future.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like an hack, but given that we are using .mjs files from some tests I think we should still merge this PR.

For example, it will make tests for #12266 much easier.

package.json Outdated Show resolved Hide resolved
@nicolo-ribaudo nicolo-ribaudo merged commit 09c0ee0 into babel:main Oct 30, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the bump-jest-26 branch October 30, 2020 11:06
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Dependency ⬆️ PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants