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

Update to Jest 28 #14490

Merged
merged 5 commits into from May 4, 2022
Merged

Update to Jest 28 #14490

merged 5 commits into from May 4, 2022

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Apr 25, 2022

Q                       A
Any Dependency Changes? Bump Jest to v28
License MIT

@babel-bot
Copy link
Collaborator

babel-bot commented Apr 25, 2022

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

@JLHwung
Copy link
Contributor Author

JLHwung commented Apr 25, 2022

CI error is due to jestjs/jest#12745.

@nicolo-ribaudo
Copy link
Member

This should be rebased after merging #14488.

@nicolo-ribaudo nicolo-ribaudo force-pushed the jest-28 branch 3 times, most recently from bd2789a to 29cd2fd Compare May 1, 2022 16:16
@nicolo-ribaudo
Copy link
Member

@JLHwung Are you sure jest.getVersion is supposed to exist? It's not documented at https://jestjs.io/docs/jest-object 🤔

@SimenB
Copy link
Contributor

SimenB commented May 3, 2022

It's not a thing - to get the version you'll need to parse jest/package.json (keeping the node version check but adjusting to node 10 seems easier, tho)

@nicolo-ribaudo
Copy link
Member

Thanks!

@JLHwung
Copy link
Contributor Author

JLHwung commented May 3, 2022

@JLHwung Are you sure jest.getVersion is supposed to exist? It's not documented at https://jestjs.io/docs/jest-object 🤔

Ah jest.getVersion does not exist in Jest 24.

It does exist in Jest 28:

https://github.com/facebook/jest/blob/8f9b812faf8e4d241d560a8574f0c6ed20a89365/packages/jest/src/index.ts#L11

@SimenB
Copy link
Contributor

SimenB commented May 3, 2022

Ah!

That's import {getVersion} from 'jest', not the jest "global" (module scoped)

@JLHwung JLHwung marked this pull request as ready for review May 3, 2022 14:57
@JLHwung JLHwung added PR: Internal 🏠 A type of pull request used for our changelog categories PR: Dependency ⬆️ labels May 4, 2022
@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented May 4, 2022

The flaky failing e2e test is because receiveMessageOnPort in @babel/eslint-parser sometimes returns undefined, even if we only ever wake the main thread after posting an object on the port. This looks like a Node.js bug 😕

@nicolo-ribaudo
Copy link
Member

Ok it passed now 🤷

@nicolo-ribaudo nicolo-ribaudo changed the title update to Jest 28 Update to Jest 28 May 4, 2022
@nicolo-ribaudo nicolo-ribaudo merged commit 12011ff into babel:main May 4, 2022
@nicolo-ribaudo nicolo-ribaudo deleted the jest-28 branch May 4, 2022 15:56
@SimenB
Copy link
Contributor

SimenB commented May 4, 2022

🎉

@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 Aug 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2022
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