MCPcopy
hub / github.com/vitest-dev/vitest / getDefaultState

Function getDefaultState

packages/spy/src/index.ts:667–680  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

665}
666
667function getDefaultState(): MockContext {
668 const state = {
669 calls: [],
670 contexts: [],
671 instances: [],
672 invocationCallOrder: [],
673 settledResults: [],
674 results: [],
675 get lastCall() {
676 return state.calls.at(-1)
677 },
678 }
679 return state
680}
681
682export function restoreAllMocks(): void {
683 for (const restore of MOCK_RESTORE) {

Callers 1

createMockInstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected