ReviewOS

also looking at this

zig-utils/zig-test-framework

Make watch mode rerun affected tests

#28
Merged glennmichael123 wants to merge codex/issue-11-watch-affected into main
5 files +621 -105
README.mdmodified+12-0
Changes to README.md
@@ -882,6 +882,17 @@ The async, snapshot, progress, and timeout examples are compile-checked rather
882882than executed by this step because they intentionally demonstrate delays,
883883generated files, interactive output, or failure handling.
884884
885## Watch Mode
886
887```bash
888zig-test --test-dir tests --watch
889```
890
891After the initial full run, watch mode reruns changed tests or tests affected by
892relative Zig imports. It falls back to the full suite when dependency data is
893incomplete. Type `r` and press Enter to force a full rerun. See
894[docs/watch-mode.md](docs/watch-mode.md) for selection and debounce behavior.
895
885896## Requirements
886897
887898- The exact Zig development build recorded in [`.zig-version`](.zig-version)
@@ -905,6 +916,7 @@ Comprehensive guides and API documentation:
905916- **[Mocking & Spying](docs/mocks.md)** - Complete Jest-compatible mocking API with 20+ methods
906917- **[Snapshot Testing](docs/snapshots.md)** - Multiple formats, named snapshots, and diff visualization
907918- **[Date & Time Mocking](docs/dates-and-times.md)** - Control time with `setSystemTime()` and Jest-compatible APIs
919- **[Watch Mode](docs/watch-mode.md)** - Affected-test selection, safe fallbacks, and full reruns
908920
909921### Additional Resources
910922