-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
watch
+ --changed
is unreliable with unexpected DX
#3666
Comments
dealing with this as well, we migrated an existing project from jest to vitest. our project has several thousand tests, waiting for the initial test run takes around 3 minutes. I'd like Vitest to only test what was changed when i boot it up and then keep watching for further changes that i make as I make them. I'm currently working around this with a little
|
|
@sheremet-va thank you, please kindly clarify your reply:
There are 2 whys about this statement. Why is
Is it irrational for the user to want to run tests for the changed tests only at first for
|
@o-alexandrov I can see your point. The behavior will change in the next version:
|
Describe the bug
Running
vitest
with--changed
is unreliable and produces unexpected developer experience.Reproduction
When running the command below, there are two different bugs:
Case 1 (no changes initially)
You'll see
No test files found, exiting with code 0
watch
, shouldn't the script continue to watch all files that it compared against that were initially checked if there are any changes?watch
shouldn't exit if there are no changes, it should keep running so when a change happens, it reacts to the fileCase 2 (file X was changed)
The file X would be tested.
Then, if you change file Y,
vitest
wouldn't run tests in file Y.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: