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

Next v12 compatibility (2nd attempt) #296

Merged
merged 4 commits into from
Mar 11, 2022
Merged

Next v12 compatibility (2nd attempt) #296

merged 4 commits into from
Mar 11, 2022

Conversation

toomuchdesign
Copy link
Collaborator

@toomuchdesign toomuchdesign commented Mar 11, 2022

What kind of change does this PR introduce?

Bug fix

What is the current behaviour?

Jest can't handle mixed CommonJs/ES Modules imports in Next.js

What is the new behaviour?

Set global process.env.__NEXT_TEST_MODE variable which Next.js uses to not mix imports

Does this PR introduce a breaking change?

Yes, Next.js version supported >= 12.1.0

Other information:

Should replace #294 #295

Please check if the PR fulfills these requirements:

  • Tests for the changes have been added
  • Docs have been added / updated

@toomuchdesign toomuchdesign changed the title Node 12 jest Next v12 compatibility (2nd attempt) Mar 11, 2022
@toomuchdesign toomuchdesign linked an issue Mar 11, 2022 that may be closed by this pull request
@toomuchdesign toomuchdesign merged commit 56c2c33 into master Mar 11, 2022
@toomuchdesign toomuchdesign deleted the node-12-jest branch March 11, 2022 15:05
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.

Next.js v12 compatibility
2 participants