--changed
not propagating to yarn workspaces
#4674
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
Hi there! Big fans of the project, a big thank you for all the hard work and v1.0 is great so far!
This is most likely me setting up something wrong, but have boiled it down to as minimal reproduction as I can.
If running vitest in a simple repo, or in a sub package in a workspace running
vitest --changed
will run only the tests connected to changed code.When in workspaces running from the root, this fails to find changes.
Reproduction
Here is a stackblits: https://stackblitz.com/~/github.com/JoeHart/stackblitz-starters-2hovz4
Here is the github repo: https://github.com/JoeHart/stackblitz-starters-2hovz4
I can't test it inside stackblits since
--changed
appears to be using some sort of git command that is dissallowed.To reproduce:
git clone git@github.com:JoeHart/stackblitz-starters-2hovz4.git
yarn
inside the repo.packages/packageA/index.js
Here is an example new contents for the file:
So the test should still pass but the runner should find it.
yarn vitest --changed
Expected behaviour:
Actual behaviour:
I get this output:
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: