fix(vite): autorefresh new spec files #17270
Merged
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.
User facing changelog
When adding a new spec file in vite-dev-server to run, the server is suppose to re-run the tests when making a change to it.
Previously, it was only done with files existing at startup. Now, the list of files updates.
Reproduction
Open one of the spec files in Cypress, open the same file in vscode
Change the file in vscode
It will re-run the current spec (expected)
Now add a new spec file (a file named
npm/vite-dev-server/cypress/components/test.spec.js
)The file appears in Cypress
Click on it to open it
Now add a test in this new file and save
BUG: The file should be re-run and is simply left alone
FIXED: The file now re-runs