Skip to content

Commit

Permalink
docs: add mising async to resolves and rejects example (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarsia committed Jun 13, 2022
1 parent 35ab058 commit 36c39a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/index.md
Expand Up @@ -1253,7 +1253,7 @@ When you use `test` in the top level of file, they are collected as part of the
```ts
import { expect, test } from 'vitest'

function buyApples() {
async function buyApples() {
return fetch('/buy/apples').then(r => r.json())
}

Expand Down Expand Up @@ -1281,7 +1281,7 @@ When you use `test` in the top level of file, they are collected as part of the
```ts
import { expect, test } from 'vitest'

function buyApples(id) {
async function buyApples(id) {
if (!id)
throw new Error('no id')
}
Expand Down

0 comments on commit 36c39a5

Please sign in to comment.