Vitest · Method
vi.clearAllMocks
Clears the recorded history of all mocks and spies without changing their implementations. Vitest can also run it automatically before each test when clearMocks is enabled.
Last updated
Syntax
vi.clearAllMocks(): VitestIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
vi.resetAllMocksvi.restoreAllMocksvi.fnvi.spyOn