Skip to content
masterclass Buddy

Vitest · Method

vi.resetAllMocks

vi.resetAllMocks() clears call history and resets the implementation of every mock. It does not restore the original implementation of a spy.

Last updated

Syntax

function resetAllMocks(): Vitest

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • vi.clearAllMocks
  • vi.restoreAllMocks
  • vi.spyOn
  • mockReset

Source: Vi | Vitest. Checked 2026-11-03.