Commit Graph

1 Commits

Author SHA1 Message Date
Steve Yegge
7d0cccdccb Add comprehensive unit tests for FileWatcher (bd-78)
- Test JSONL change detection with fsnotify
- Test multiple changes debounced into single action
- Test git ref change detection (platform-aware, skips if unsupported)
- Test file removal/recreation handling (platform-aware)
- Test polling fallback mode
- Test polling detects file disappearance
- Test proper cleanup with Close()

All 7 tests pass. Two tests skip gracefully on platforms where
fsnotify doesn't support git ref watching or file removal/recreation
events. No linter warnings for new test file.

Closes bd-78

Amp-Thread-ID: https://ampcode.com/threads/T-76e7b2ba-150c-461f-83e2-4a6d509d6b53
Co-authored-by: Amp <amp@ampcode.com>
2025-10-29 11:47:40 -07:00