Skip to content

Commit

Permalink
docs: fix vi.fn signature (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng committed Sep 9, 2022
1 parent 8cd7def commit 0c2e323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/index.md
Expand Up @@ -1794,7 +1794,7 @@ Vitest provides utility functions to help you out through it's **vi** helper. Yo

### vi.fn

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

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](#mockinstance-methods).
If no function is given, mock will return `undefined`, when invoked.
Expand Down

0 comments on commit 0c2e323

Please sign in to comment.