Skip to content

Commit

Permalink
docs: add config param to useFakeTimer (#5213)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhdev authored Feb 16, 2024
1 parent 7d9b1fb commit cad08ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ vi.useRealTimers()

### vi.useFakeTimers

- **Type:** `() => Vitest`
- **Type:** `(config?: FakeTimerInstallOpts) => Vitest`

To enable mocking timers, you need to call this method. It will wrap all further calls to timers (such as `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `nextTick`, `setImmediate`, `clearImmediate`, and `Date`), until [`vi.useRealTimers()`](#vi-userealtimers) is called.

Expand Down

0 comments on commit cad08ee

Please sign in to comment.