-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(testing): do not set vitest root when not in workspaceRoot #14362
Merged
barbados-clemens
merged 1 commit into
nrwl:master
from
barbados-clemens:fix/vitest-root-offset
Jan 20, 2023
Merged
fix(testing): do not set vitest root when not in workspaceRoot #14362
barbados-clemens
merged 1 commit into
nrwl:master
from
barbados-clemens:fix/vitest-root-offset
Jan 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
jaysoo
approved these changes
Jan 13, 2023
barbados-clemens
force-pushed
the
fix/vitest-root-offset
branch
from
January 20, 2023 19:38
9513f32
to
29d003d
Compare
barbados-clemens
added
the
scope: testing tools
Issues related to Cypress / Jest / Playwright / Vitest support in Nx
label
Jan 20, 2023
barbados-clemens
force-pushed
the
fix/vitest-root-offset
branch
from
January 20, 2023 21:33
6738c39
to
ceb9898
Compare
FrozenPandaz
pushed a commit
that referenced
this pull request
Jan 20, 2023
(cherry picked from commit 7857ae0)
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Behavior
when running vitest in the project root no tests are found as it's looks in an invalid path. {workspaceRoot}/{projectRoot}/{projectRoot}
Expected Behavior
vitest does not search in an invalid path (extra {projectRoot} appended to the path).
The change will set the vitest root to the project root being tested if the ExecutorContext#cwd is the
workspaceRoot
otherwise it will be set to an empty string letting vitest set the root to the current process.cwdRelated Issue(s)
Fixes #14208