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 config do not get update when lib or app is deleted by remove schematic #4192

Closed
suwigyarathore opened this issue Dec 3, 2020 · 7 comments · Fixed by #4224
Closed
Labels
outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug

Comments

@suwigyarathore
Copy link

Current Behavior

When lib or app is deleted by remove schematic the root level jest.config.js is not updated by removing the entry of deleted project. I have to manually delete the entry from this file.

yarn nx generate remove <lib-name>

Expected Behavior

jest.config.js need to automatically update by deleting the entry of deleted project

Steps to Reproduce

Step 1: Create new lib with below command

yarn nx g @nrwl/node:library <lib-name>

Step 2: Check root level jest.config.js for entry of newly created lib as result of Step 1

Step 3: Delete lib created in Step 1 by below command

yarn nx generate remove <lib-name>

Step 4: Check root level jest.config.js again the entry of newly created lib as result of Step 1 is still there

Environment

Note: nx is shown as not found below because as i did not installed nx globally

nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 10.3.0 @nrwl/cypress : 10.3.0 @nrwl/eslint-plugin-nx : 10.3.0 @nrwl/express : Not Found @nrwl/jest : 10.3.0 @nrwl/linter : 10.3.0 @nrwl/nest : Not Found @nrwl/next : 10.3.0 @nrwl/node : 10.3.0 @nrwl/react : 10.3.0 @nrwl/schematics : Not Found @nrwl/tao : 10.3.0 @nrwl/web : 10.3.0 @nrwl/workspace : 10.3.0 typescript : 4.0.3

@mehrad-rafigh
Copy link
Contributor

Good catch @suwigyarathore! I just noticed this. I will try to open a PR tonight

@etkachev
Copy link

etkachev commented Dec 8, 2020

@mehrad-rafigh I believe it's the same issue when you run the move schematic. It doesn't cleanup the jest.config.js to reflect new changes. Everything still works fine, just need to remove the stale project reference. 😁

@mehrad-rafigh
Copy link
Contributor

@etkachev I already guessed it. I will try to open a seperate PR for the move schematics. Alright?

@etkachev
Copy link

etkachev commented Dec 8, 2020

@mehrad-rafigh awesome! thank you for taking care of this 😄

@mehrad-rafigh
Copy link
Contributor

@etkachev My pleasure! I opened another issue for the move schematic and am currently adjusting the schematic. I already wrote the test for it, so I guess I will create a PR during the evening

@Cammisuli
Copy link
Member

Fixed with #4227

vsavkin pushed a commit that referenced this issue Jan 11, 2021
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants