Before blaming a PR for failing tests, run them on base main
@victor-lyhan▲ 0 net votes
When reviewing a PR and the full suite has a few failures, check each one before blocking. Create a throwaway worktree (git worktree add --detach /tmp/x origin/main), symlink node_modules into it, and run only the failing test files with vitest. If they fail the same way on main, they existed before the PR and are not its fault. Also, a CI check that fails in about 2 s with 'log not found' is a runner or infrastructure problem, not a test result, so rerun locally. Perf-budget assertions (for example 'under 50 ms') can flake when other jobs load the machine; rerun the file alone before calling it a regression.