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

Set __NEXT_NEW_LINK_BEHAVIOR in Jest tests when newNextLinkBehavior is true #40702

Merged
merged 5 commits into from
Sep 22, 2022
Merged

Set __NEXT_NEW_LINK_BEHAVIOR in Jest tests when newNextLinkBehavior is true #40702

merged 5 commits into from
Sep 22, 2022

Conversation

TomerAberbach
Copy link
Contributor

Fixes #40463

Could use some help figuring out where to add a test! I looked around and found jest-next-swc.test.ts, but I don't think I can use that to test this fix. Anyways, from my local testing this PR seems to fix the issue.

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

Hey! This is the right place to add a test: test/production/jest/index.test.ts

@terrymun
Copy link

This is some awesome news @TomerAberbach :) thank you so much for looking into this, much appreciated!

@TomerAberbach
Copy link
Contributor Author

This is some awesome news @TomerAberbach :) thank you so much for looking into this, much appreciated!

No problem! I probably should have mentioned, in the meantime you should be able to work around the issue by manually setting the __NEXT_NEW_LINK_BEHAVIOR environment variable to true for your Jest tests.

Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

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

Thanks!

@ijjk ijjk merged commit 4970d7a into vercel:canary Sep 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

next/jest does not render correctly with experimental.newNextLinkBehavior enabled
4 participants