mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
723 B
723 B
title, outline
| title | outline |
|---|---|
| update | Config | deep |
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