clearAllMocks
function in meocord/testing Since 4.1.0
clearAllMocks(): voidClears the calls every mock from meocord/testing has recorded, keeping what each was told to do.
Vitest's clearMocks and jest's clearAllMocks() reach only their own vi.fn() and jest.fn() mocks, and
meocord's too once useMockFn makes them with the runner's function. This one covers createMockFn and
everything built on it, such as createMockInteraction and createMockClient, either way. To also undo what a test
set, use resetAllMocks.
Examples
import { afterEach } from 'vitest'
afterEach(() => clearAllMocks())