Skip to content

Commit

Permalink
docs: remove outdated note (#6838)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Nov 1, 2024
1 parent 234674d commit 1a8d670
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ interface TestOptions {
}
```

Vitest 1.3.0 deprecates the use of options as the last parameter. You will see a deprecation message until 2.0.0 when this syntax will be removed. If you need to pass down options, use `test` function's second argument:

```ts
import { test } from 'vitest'

test('flaky test', () => {}, { retry: 3 }) // [!code --]
test('flaky test', { retry: 3 }, () => {}) // [!code ++]
```

When a test function returns a promise, the runner will wait until it is resolved to collect async expectations. If the promise is rejected, the test will fail.

::: tip
Expand Down

0 comments on commit 1a8d670

Please sign in to comment.