[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

docs: add warning for clearMocks option in async tests (#9697)

Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>

authored by

Vladimir Sheremet
and committed by
GitHub
(Feb 20, 2026, 11:47 AM +0100) b7902bcb 30936208

+20
+4
docs/config/clearmocks.md
··· 21 21 }, 22 22 }) 23 23 ``` 24 + 25 + ::: warning 26 + Be aware that this option may cause problems with async [concurrent tests](/api/test#test-concurrent). If enabled, the completion of one test will clear the mock history for all mocks, including those currently being used by other tests in progress. 27 + :::
+4
docs/config/mockreset.md
··· 21 21 }, 22 22 }) 23 23 ``` 24 + 25 + ::: warning 26 + Be aware that this option may cause problems with async [concurrent tests](/api/test#test-concurrent). If enabled, the completion of one test will clear the mock history and implementation for all mocks, including those currently being used by other tests in progress. 27 + :::
+4
docs/config/restoremocks.md
··· 21 21 }, 22 22 }) 23 23 ``` 24 + 25 + ::: warning 26 + Be aware that this option may cause problems with async [concurrent tests](/api/test#test-concurrent). If enabled, the completion of one test will restore the implementation for all spies, including those currently being used by other tests in progress. 27 + :::
+4
docs/config/unstubenvs.md
··· 19 19 }, 20 20 }) 21 21 ``` 22 + 23 + ::: warning 24 + Be aware that this option may cause problems with async [concurrent tests](/api/test#test-concurrent). If enabled, the completion of one test will restore all the values changed with [`vi.stubEnv`](/api/vi#vi-stubenv), including those currently being used by other tests in progress. 25 + :::
+4
docs/config/unstubglobals.md
··· 19 19 }, 20 20 }) 21 21 ``` 22 + 23 + ::: warning 24 + Be aware that this option may cause problems with async [concurrent tests](/api/test#test-concurrent). If enabled, the completion of one test will restore all global values that were changed with [`vi.stubGlobal`](/api/vi#vi-stubglobal), including those currently being used by other tests in progress. 25 + :::