AUG 26, 2026
Playwright's --update-snapshots silently skips files inside the tolerance
The default mode compares before writing, so any baseline whose change fits under maxDiffPixelRatio is left stale - and the run still exits 0.
maxDiffPixelRatio: 0.01 absorbs font rasterisation differences between
machines. It also absorbs most small changes on a large screenshot - on a
full-page shot at 1440 that is roughly 86,000 pixels of slack.
The part worth knowing: Playwright's default --update-snapshots compares
each baseline first and only rewrites the ones that already fail. Any file
whose change fits inside the tolerance is skipped and left stale, and the run
reports success.
Re-recording after a layout change rewrote 23 of 25 baselines. The two it skipped were not unchanged - they were stale, and three files shipped wrong before a forced re-record caught them.
# rewrites unconditionally
pnpm exec playwright test tests/visual.spec.ts --update-snapshots=allFixed at the source so the default cannot be reached by accident:
"test:visual:update": "playwright test tests/visual.spec.ts --update-snapshots=all"The general lesson is cheaper than the specific one: the run exited 0 both
times. Check git status on the snapshots directory to see what actually
changed, rather than trusting an exit code to mean the work was done.