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

Upgrade to new major version 26 of Jest #81

Merged
merged 2 commits into from May 25, 2020
Merged

Upgrade to new major version 26 of Jest #81

merged 2 commits into from May 25, 2020

Conversation

Vinnl
Copy link
Contributor

@Vinnl Vinnl commented May 18, 2020

Upgrade to new major version of Jest. This release did not contain any breaking changes that affects us.

It did introduce a way to import globals rather than relying on them being present implicitly.

Unfortunately, I did run into a bug that that did not combine well with jest.mock, so those are still relying on the implicit jest global. I reported that bug here: jestjs/jest#10060

@Vinnl Vinnl requested a review from NSeydoux May 18, 2020 16:25
@Vinnl Vinnl self-assigned this May 18, 2020
Vinnl added 2 commits May 25, 2020 15:50
This makes it easier for TypeScript to typecheck our tests, rather
relying on `any`-typed globals.

For more details, see
https://jestjs.io/blog/2020/05/05/jest-26#a-new-way-to-consume-jest---jestglobals

Unfortunately, it was not possible to
`import { jest } from "@jest/globals"` in files that also call
jest.mock(). This was reported here:
jestjs/jest#10060
@NSeydoux NSeydoux mentioned this pull request May 25, 2020
3 tasks
@Vinnl Vinnl merged commit 6535770 into master May 25, 2020
@Vinnl Vinnl deleted the chore/jest-26.0.0 branch May 25, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants