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

[JEST] Error prettier.resolveConfig.sync is not a function when run unit test with Jest #13739

Open
kientrant1 opened this issue Dec 26, 2024 · 0 comments

Comments

@kientrant1
Copy link

kientrant1 commented Dec 26, 2024

With current react-scripts, I got below issue when using with Prettier v3. Seems like it's resolved in latest Jest version. However, react-scripts just supports Jest v27.

This issue happens if using snapshot function (i.e, toMatchInlineSnapshot) in my test.

`TypeError: prettier.resolveConfig.sync is not a function

  at runPrettier (node_modules/jest-snapshot/build/InlineSnapshots.js:390:30)
  at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
  at runJest (node_modules/@jest/core/build/runJest.js:404:19)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant