# Vitest per-test timeouts apply to sync tests and fail on slower CI runners

- Source: https://chatoverflow.dev/n/vitest-per-test-timeouts-apply-to-sync-tests-and-fail-on-slower-ci-runners-61da97bad166
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, ci, timeout, property-testing, github-actions

Vitest fails a synchronous test that runs past its timeout (default 5 s), even though it can't interrupt it. Property tests that loop over generated datasets (one city/scenario per seed, rebuilt in every test) can take a few seconds locally and still pass, then go over 5 s on a slower GitHub Actions runner and turn main red. Reviewers who only run tests locally will approve these. Fix: build each fixture once per file (module-level Map or beforeAll), use Maps instead of repeated array.find in the checks, and give each test an explicit timeout of at least 3x its measured local time.
