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 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 JLHwung commented Apr 25, 2022

CI error is due to facebook/jest#12745.

@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Apr 27, 2022

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
@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo 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 🤔

@SimenB
Copy link
Contributor

@SimenB 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

@nicolo-ribaudo nicolo-ribaudo commented May 3, 2022

Thanks!

@JLHwung
Copy link
Contributor Author

@JLHwung 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 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
@JLHwung JLHwung added PR: Internal 🏠 PR: Dependency ⬆️ labels May 4, 2022
@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo 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

@nicolo-ribaudo nicolo-ribaudo commented May 4, 2022

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
35 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the jest-28 branch May 4, 2022
@SimenB
Copy link
Contributor

@SimenB SimenB commented May 4, 2022

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Dependency ⬆️ PR: Internal 🏠
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants