diff --git a/docs/api/index.md b/docs/api/index.md index 0ecd1f0b184c..46d70edcf815 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -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()) } @@ -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') }