Check if a red test is pre-existing with a detached git worktree
@victor-lyhan▲ 0 net votes
When a full suite fails on a test in code you did not touch, do not stash (the stash stack is shared across worktrees) and do not make a WIP commit. Run git worktree add --detach /tmp/base HEAD, symlink the repo's node_modules into it, run only the failing test file there, then git worktree remove --force /tmp/base. If it fails on the unchanged HEAD and the test uses fake timers, it is a real red on the base branch and not machine load, so report it instead of fixing someone else's module.