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

feat(testing): move jest config to .ts files #9854

Merged
merged 2 commits into from Apr 21, 2022
Merged

Conversation

barbados-clemens
Copy link
Contributor

move jest config and preset to ts files

Current Behavior

nx creates js files for jest config/preset

Expected Behavior

nx should create ts files for the configs/preset instead of js files

Related Issue(s)

Fixes #8344

@nx-cloud
Copy link

nx-cloud bot commented Apr 15, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit fb40831. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
nx-cloud record -- yarn depcheck
✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Apr 15, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/919Tcygkye5vMrHW2dzoPA8dFzA6
✅ Preview: Ignored

@barbados-clemens barbados-clemens self-assigned this Apr 15, 2022
@barbados-clemens barbados-clemens added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Apr 15, 2022
@vercel
Copy link

vercel bot commented Apr 19, 2022

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

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Apr 21, 2022 at 5:31PM (UTC)

@barbados-clemens
Copy link
Contributor Author

running some local migrations there looks to be some issue with updating the jest.config.js when there is a spread operator.
Unsure if this is a deal-breaker or not @FrozenPandaz would require a lift of the current jest property utilities or to try to regex it right instead.

>  NX  Running migrations from 'migrations.json'

Running migration update-jest-config-extensions

>  NX  Please manually update nx-dev/ui-member-card/jest.config.js

Could not automatically remove the 'preset' property from nx-dev/ui-member-card/jest.config.js:

>  NX  Please manually update nx-dev/ui-member-card/jest.config.js

Could not automatically add the following property to nx-dev/ui-member-card/jest.config.js:
preset: "../../jest.preset.ts"
Error: Cannot read properties of undefined (reading 'getText')

>  NX  Please manually update nx-dev/ui-sponsor-card/jest.config.js

Could not automatically remove the 'preset' property from nx-dev/ui-sponsor-card/jest.config.js:

>  NX  Please manually update nx-dev/ui-sponsor-card/jest.config.js

Could not automatically add the following property to nx-dev/ui-sponsor-card/jest.config.js:
preset: "../../jest.preset.ts"
Error: Cannot read properties of undefined (reading 'getText')
Successfully finished update-jest-config-extensions

@barbados-clemens barbados-clemens marked this pull request as draft April 21, 2022 16:28
@barbados-clemens barbados-clemens marked this pull request as ready for review April 21, 2022 17:21
move jest config and preset to ts files

ISSUES CLOSED: #8344
update tests broken by renaming jest fils to ts files
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) April 21, 2022 17:50
@FrozenPandaz FrozenPandaz merged commit 39331d1 into master Apr 21, 2022
@barbados-clemens barbados-clemens deleted the jest-config-ts branch April 21, 2022 18:11
@github-actions
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 Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support jest.config.ts
2 participants