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): support positional arg for jest executor #27328

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

MJez29
Copy link
Contributor

@MJez29 MJez29 commented Aug 7, 2024

Current Behavior

The syntax to test a single file is different when using the jest executor versus the jest cli

jest <file>
# vs
nx test project --testFile <file>

Expected Behavior

I would expect the jest executor to support a single positional argument as well

nx test project <file>

This is one of the common questions/complaints that I hear from developers when transitioning from our standalone apps to our monorepo

This change supports both syntaxes so that this is not a breaking change and prints a warning when both are used

@MJez29 MJez29 requested review from a team as code owners August 7, 2024 16:56
@MJez29 MJez29 requested a review from jaysoo August 7, 2024 16:56
Copy link

vercel bot commented Aug 7, 2024

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Aug 12, 2024 4:16pm

@isaacplmann
Copy link
Collaborator

Run nx documentation locally and commit the changes to get the CI working

@MJez29
Copy link
Contributor Author

MJez29 commented Aug 8, 2024

TypeError: stripJsonComments is not a function

I see this error now in CI 🤔

@JamesHenry
Copy link
Collaborator

@MJez29 It was an issue on an older version of master, I've just pulled in the latest for you

@MJez29
Copy link
Contributor Author

MJez29 commented Aug 9, 2024

@isaacplmann @JamesHenry how can I resolve the CI failure now? It looks like a timeout to me

Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed this in my previous review. One last small thing left, and it should be good to go 🚀

docs/shared/packages/jest/jest-plugin.md Outdated Show resolved Hide resolved
@leosvelperez leosvelperez merged commit b224e7c into nrwl:master Aug 13, 2024
6 checks passed
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 Aug 28, 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.

4 participants