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: don't rerun more then needed in watch mode (fix #442) #606

Merged
merged 1 commit into from Jan 22, 2022

Conversation

Demivan
Copy link
Member

@Demivan Demivan commented Jan 22, 2022

Fixes #442

What was happening with #442 is that onChange was called for a file. That adds it to changedTests. After that onChange was triggered for a file in .idea folder. And because changedTests is not empty another rerun was scheduled.

this.handleFileChanged(id)
if (this.changedTests.size)
this.scheduleRerun(id)

Fixed by returning from handleFileChanged indication whether changedTests was mutated and rerun it needed.

@netlify
Copy link

netlify bot commented Jan 22, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: d7cacff

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/61ebd2173b8a720008696b93

😎 Browse the preview: https://deploy-preview-606--vitest-dev.netlify.app

@antfu antfu merged commit 4d9e7cc into vitest-dev:main Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vitest doesn't ignore webstorm / vscode folders
2 participants