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 Jest config with SWC docs #37705

Merged
merged 1 commit into from
Jun 15, 2022
Merged

Update Jest config with SWC docs #37705

merged 1 commit into from
Jun 15, 2022

Conversation

nvh95
Copy link
Contributor

@nvh95 nvh95 commented Jun 15, 2022

Motivation/ Context

-const createJestConfig = nextJest({ dir }) // `dir` IS NOT DEFINED
+const createJestConfig = nextJest({ dir: './' }) // Should change to this. Sync with https://nextjs.org/docs/testing#setting-up-jest-with-the-rust-compiler
  • This PR is to help others to configure Jest with SWC by copying code from the documentation site without encountering the same issue as I did.

Documentation

Future work

  • Since Upgrade guide from 11 => 12 did not mention anything about Jest. If I remove .babelrc to opt-in SWC. The current Jest settings will crash (since it's using babel). We likely want to update the Upgrade guide to mention this cc: @leerob

Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

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

Thanks!

@kodiakhq kodiakhq bot merged commit 0f873c7 into vercel:canary Jun 15, 2022
@nvh95 nvh95 deleted the patch-1 branch June 15, 2022 11:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants