Watch Mode Shortcuts in Vitest

From the Vitest cheat sheet · CLI & Watch Mode · verified Nov 2026

Watch Mode Shortcuts

Keyboard shortcuts available while vitest is watching

bash
# Press while vitest is watching
a / Enter   rerun all tests
f           rerun only failed tests
u           update failed snapshots
p           filter by filename
t           filter by test name (regex)
q           quit
⚡ Press f after a big refactor to loop on just the broken tests
💡 i (5.1+) lets you accept or reject each snapshot change
🟢 Watch reruns only tests that import the file you changed
📌 CI or a non-TTY shell turns watch off; use vitest run explicitly
watchshortcutskeyboard

Continue with Vitest

Save the full cheat sheet or work through every related task.

More Vitest tasks

Back to the full Vitest cheat sheet