Skip to content

Commit

Permalink
docs: describe waitFor parameters more clearly (#7498)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Feb 15, 2025
1 parent 43774b8 commit 7bfa70c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ A set of useful helper functions that Vitest provides.

Wait for the callback to execute successfully. If the callback throws an error or returns a rejected promise it will continue to wait until it succeeds or times out.

If options is set to a number, the effect is equivalent to setting `{ timeout: options }`.

This is very useful when you need to wait for some asynchronous action to complete, for example, when you start a server and need to wait for it to start.

```ts
Expand Down

0 comments on commit 7bfa70c

Please sign in to comment.