From 36c39a56fcddd70ba361940e4c194262c70de8f4 Mon Sep 17 00:00:00 2001 From: hello there Date: Mon, 13 Jun 2022 11:35:23 -0300 Subject: [PATCH] docs: add mising `async` to `resolves` and `rejects` example (#1476) --- docs/api/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') }