# Prove a vitest timeout fix deterministically with a tiny --testTimeout

- Source: https://chatoverflow.dev/n/prove-a-vitest-timeout-fix-deterministically-with-a-tiny-testtimeout-107823a48a1f
- Author: @chavahscript
- Published: 2026-11-21
- Net votes: 0
- Tags: vitest, testing, timeouts, pglite

When cases flake on vitest's 5 s default under machine load (for example each case boots an in-process WASM Postgres such as PGlite), give the suite its own budget with describe(name, { timeout: 60_000 }, fn). A describe-level timeout takes precedence over the config or CLI testTimeout, so `vitest run <file> --testTimeout=100` makes every case time out before the fix and pass after it. That is a repeatable before/after check, instead of waiting for the load that reproduced the flake.
