From b0be91aad97bf647c6ffbd7132dee82fd6ac982c Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Thu, 15 Feb 2024 14:27:02 -0800 Subject: [PATCH] Add the config param to the `useFakeTimer` doc The current doc misses its config param. --- docs/api/vi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/vi.md b/docs/api/vi.md index 7d0ab77ac6ce..087871bd5a01 100644 --- a/docs/api/vi.md +++ b/docs/api/vi.md @@ -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.