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

fix(repo): should ensure that unit tests are run correctly across package managers #22978

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Apr 24, 2024

Current Behavior

NPM sets an INIT_CWD env var which is used when calculating the path to generate files for project generators.
When running via plugin usage, the CWD of the sub process is set to our projects directory containing the config file.
But with NPM, the INIT_CWD is still workspaceRoot if run at root of the repo
Therefore, our unit tests that were written as though running at root, were now running in a subdirectory, causing incorrect paths on all package managers except NPM.

Expected Behavior

Unit tests should continue to function, regardless of package manager

Related Issue(s)

Fixes #

@Coly010 Coly010 requested a review from a team as a code owner April 24, 2024 15:57
@Coly010 Coly010 self-assigned this Apr 24, 2024
Copy link

vercel bot commented Apr 24, 2024

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 4:00pm

@FrozenPandaz FrozenPandaz merged commit aa76007 into nrwl:master Apr 26, 2024
6 checks passed
@Coly010 Coly010 deleted the fix-unit-test-cwd branch April 26, 2024 14:48
Copy link

github-actions bot commented May 2, 2024

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 May 2, 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.

None yet

3 participants