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

Formatting of jest.config.js #3889

Closed
evtk opened this issue Oct 8, 2020 · 7 comments
Closed

Formatting of jest.config.js #3889

evtk opened this issue Oct 8, 2020 · 7 comments
Labels
blocked: more info needed outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx stale type: bug

Comments

@evtk
Copy link

evtk commented Oct 8, 2020

Current Behavior

After generating new apps or libs, the jest.config.js is expanded with a new entry. This happens on the same line as the last entry.

"<rootDir>/apps/myfirstapp","<rootDir>/libs/mynewlib"

Expected Behavior

It should be formatted on a newline:

"<rootDir>/apps/myfirstapp",
"<rootDir>/libs/mynewlib"

and use double quotes might be a preference, but i think normally this would be single quotes.

@evtk evtk added the type: bug label Oct 8, 2020
@vsavkin vsavkin added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Oct 9, 2020
@evtk
Copy link
Author

evtk commented Nov 12, 2020

any progress on this one?

@Cammisuli
Copy link
Member

Hey @evtk, sorry about a late response to this!

I tried to a new Nest app in a recent version of Nx, and it looks like the Jest config is being formatted properly.

Files should be formatted using whatever prettier configs are in the workspace. So make sure that .prettierignore doesn't have the jest config in there.

If the config isn't in the ignore file, what kind of library or app are you generating?

@evtk
Copy link
Author

evtk commented Jan 19, 2021

Hi there @Cammisuli. We are using NX for our corporate mono repo full of Angular apps. So upon generating a new Angular lib, the jest config for this library is not added on a new line on the jest.config.js.

@Cammisuli
Copy link
Member

What version of Nx are you using?

@evtk
Copy link
Author

evtk commented Jan 25, 2021

@Cammisuli I'm running version: "@nrwl/workspace": "11.1.5",

@github-actions
Copy link

github-actions bot commented Feb 8, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@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
blocked: more info needed outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

3 participants