Skip to content

Commit

Permalink
docs: fix return type for vi.fn
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Aug 14, 2023
1 parent 38aad4e commit dbf0e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/vi.md
Expand Up @@ -82,7 +82,7 @@ import { vi } from 'vitest'

## vi.fn

- **Type:** `(fn?: Function) => CallableMockInstance`
- **Type:** `(fn?: Function) => Mock`

Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](/api/mock).
If no function is given, mock will return `undefined`, when invoked.
Expand Down

0 comments on commit dbf0e97

Please sign in to comment.