Dark mode
CLI
bash
vitest basic
Specifying a Timeout
You can optionally pass a timeout in milliseconds as third argument to tests. The default is 5 seconds.
ts
import { test } from "vitest";
test("name", async () => {/* ... */}, 1000);
Hooks also can receive a timeout, with the same 5 seconds default.
ts
import { test } from "vitest";
test("name", async () => {/* ... */}, 1000);