Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
1
import
type
{ MockContext } from
'vitest'
2
import
{ describe, expect, test, vi } from
'vitest'
3
4
test(
'vi.fn() returns undefined by default'
, () => {
Callers
nothing calls this directly
Calls
15
mockImplementationOnce
Method · 0.80
mockImplementation
Method · 0.80
withImplementation
Method · 0.80
mockClear
Method · 0.80
mockReset
Method · 0.80
getMockImplementation
Method · 0.80
getMockName
Method · 0.80
mockName
Method · 0.80
mockReturnValueOnce
Method · 0.80
mockReturnValue
Method · 0.80
mockRestore
Method · 0.80
mockReturnThis
Method · 0.80
Tested by
no test coverage detected