How to make Vitest faster for coding agents
Vitest can now run the only the delta since the last run.
vitest run --since-last-run
Instead of all the git diff and other magics, Vitest now remembers the last time it ran and rerun only the tests that might have been affected since then.
Basically on first run executes the full suite and on subsequent runs it checks only the modified files.
It is meant for faster feedback loop for the coding agents.
You can add something like this in your AGENTS.md file
- After each change, run `vitest run --since-last-run`.
- Before finishing, run the full suite once with `vitest run`.
That’s pretty much it. Now your agentic development got much faster.