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: reset snapshot state between test reruns #1162

Merged
merged 1 commit into from Apr 19, 2022

Conversation

AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Apr 18, 2022

Fixes #1161.

I'm not 100% sure whether async runFiles() is the correct place to clear snapshots, but it works.

Currently snapshots are only cleared in async scheduleRerun(triggerId: string).

this.snapshot.clear()

@netlify
Copy link

netlify bot commented Apr 18, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 1a47529
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/625d04d45f325700084f6648
😎 Deploy Preview https://deploy-preview-1162--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antfu antfu merged commit c2e98ef into vitest-dev:main Apr 19, 2022
@AriPerkkio AriPerkkio deleted the fix/snapshot-count-on-rerun branch April 19, 2022 03:52
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 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.

Failed snapshot count does not reset after re-run
2 participants