You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: propose test isolation improvements (clearMocks/restoreMocks) and coverage reporting #338158
Hello! 👋 While working with the test suite in this repository, I noticed we could further improve test reliability and maintainability.
I propose adding the following configuration options to vitest.config.ts:
Test Isolation (clearMocks & restoreMocks): Automatically resetting and restoring mocks between test runs to prevent potential side-effects and flaky test behaviors.
Code Coverage Support: Adding a baseline v8 coverage configuration to make tracking test coverage metrics easier for contributors.
Activity
dmitrivMS commentedon Nov 15, 2026
Your PR added clearMocks/restoreMocks. I don't think we have an immediate need to enable code coverage globally though.
denizguney commentedon Nov 15, 2026
Thanks for the feedback! Should I remove the global code coverage configuration and update the PR to keep only clearMocks/restoreMocks?
dmitrivMS commentedon Nov 15, 2026
Deniz Güney Yıldırım (@denizguney) The PR is already merged...