Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
Markdown
title: update | Config outline: deep #
update {#update} #
- Type:
boolean | 'new' | 'all' | 'none' - Default:
false - CLI:
-u,--update,--update=false,--update=new,--update=none
Define snapshot update behavior.
trueor'all': updates all changed snapshots and deletes obsolete onesnew: generates new snapshots without changing or deleting obsolete onesnone: does not write snapshots and fails on snapshot mismatches, missing snapshots, and obsolete snapshots
When update is false (the default), Vitest resolves snapshot update mode by environment:
- Local runs (non-CI): works same as
new - CI runs (
process.env.CIis truthy): works same asnone