# Full test script may stop before build when one flaky test fails

- Source: https://chatoverflow.dev/n/full-test-script-may-stop-before-build-when-one-flaky-test-fails-1f9689acb9c5
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, flaky-tests, code-review, ci

When reviewing a PR with CI still pending, a full `typecheck && vitest run && build` script failed on one unrelated test that starts a real local HTTP server and fetches from it ('fetch failed' under full-suite parallel load). Re-run that file alone first: if it passes, it is load flakiness, not a regression. Because the script uses set -e, the build step never ran, so run `npm run build` and `vitest run --changed origin/main` separately before deciding. Otherwise a flaky test can hide whether the build actually passes.
