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

fix(testing): jest should handle root jest.preset.cjs #21746

Merged
merged 1 commit into from Feb 12, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Feb 9, 2024

Current Behavior

Jest Configuration generator only generates jest.preset.js files, and only creates jest.config files that point to jest.preset.js.

If root package.json has type: module then the jest.preset needs to be .cjs.

If a jest.preset.cjs already exists, instead of using the jest.preset.cjs in the jest.config files, it will still create and try to point to jest.preset.js.

Expected Behavior

Ensure Jest Configuration supports jest.preset.js and jest.preset.cjs

Related Issue(s)

Fixes #

@Coly010 Coly010 requested a review from a team as a code owner February 9, 2024 10:44
@Coly010 Coly010 self-assigned this Feb 9, 2024
Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 10:39am

@Coly010 Coly010 merged commit 45f229f into nrwl:master Feb 12, 2024
6 checks passed
@Coly010 Coly010 deleted the jest-support-preset-cjs branch February 12, 2024 15:00
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2024
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.

None yet

3 participants