MCPcopy
hub / github.com/vitest-dev/vitest / vi-fn.test.ts

File vi-fn.test.ts

test/core/test/mocking/vi-fn.test.ts:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import type { MockContext } from 'vitest'
2import { describe, expect, test, vi } from 'vitest'
3
4test('vi.fn() returns undefined by default', () => {

Callers

nothing calls this directly

Calls 15

mockImplementationMethod · 0.80
withImplementationMethod · 0.80
mockClearMethod · 0.80
mockResetMethod · 0.80
getMockImplementationMethod · 0.80
getMockNameMethod · 0.80
mockNameMethod · 0.80
mockReturnValueOnceMethod · 0.80
mockReturnValueMethod · 0.80
mockRestoreMethod · 0.80
mockReturnThisMethod · 0.80

Tested by

no test coverage detected