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(nx-plugin): thread jest options through nx-plugin:e2e executor #11442

Merged

Conversation

chiubaka
Copy link
Contributor

@chiubaka chiubaka commented Aug 4, 2022

Current Behavior

nx-plugin:e2e executor doesn't expose any of the underlying jest CLI options, making it hard to use, and in some cases incorrect.

E.g. Since E2E tests for generators in plugins operate on a single expected E2E directory (tmp/nx-e2e/proj), there is some potential for conflict due to Jest's default parallelism in tests if two tests are messing with that directory simultaneously using functions like ensureNxProject. I'd like to be able to try the --runInBand option to see if it resolves what I'm seeing, but am unable to do so because the e2e executor hides this arguments.

Unsure if this is technically a feature or a bug fix as a result.

Expected Behavior

I should be able to pass any typical jest CLI option down to the e2e executor and expect it to pass them down to the underlying jest process.

Related Issue(s)

I didn't open an issue for this. Just decided to directly PR.

@vercel
Copy link

vercel bot commented Aug 4, 2022

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Aug 4, 2022 at 10:00AM (UTC)

@chiubaka
Copy link
Contributor Author

chiubaka commented Aug 4, 2022

FWIW, runInBand did solve my issue. Feels like this particular E2E harness could be a bit more robust wrt multiple test suites.

Might be overkill to allow every option for jest, but I think at a minimum, it would be nice to have --ci, -t, and --runInBand off the top of my head.

@AgentEnder AgentEnder merged commit 4d1acad into nrwl:master Aug 18, 2022
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants