Snapshots render in a fresh child process: pixels no longer depend on test order

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 14:03:18 -04:00
1 parent 5a5b04fab6
commit f9c0a5b558
3 files changed
+35 -2

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ testdata/snapshots/ <os>/<name>-<light|dark>.png
- `ui.NewTester` drives click, keys, typing. Assert values, not existence.
- Every component: one `snapshot(t, name, w, h, view)` call (light and dark). Refresh with `go test -run <Name> -update .`
- Run `go vet ./... && go test ./...` before reporting done.
- Snapshots assume the default test order. MyGo shares its path-mask cache across a process, and its own chevrons are not snapped, so `-shuffle` can shift a few pixels (docs/upstream.md).
- Each snapshot test renders in a fresh child process (snapshot_test.go), because MyGo's path-mask cache is process-wide. Order and neighbours never change pixels; `-run <Name> -update` is safe.
## Gallery page