Commit 5e47385
authored
Fix watcher cleanup, empty-reload guard, and stale README (#43)
## Summary
Post-merge follow-up to PR #40. Addresses 3 findings from code review:
- Watcher error handler now clears debounce timer and closes FSWatcher
to avoid indeterminate state after fs.watch errors
- Reload guards against replacing fixtures with empty array on parse
failure, preserving previous working fixtures
- Update README Future Direction to reflect that `--validate-on-load`
and `validateFixtures()` now exist
## Test plan
- [x] All 565 existing tests pass
- [ ] Manually verify watcher error recovery (kill the watched file's
filesystem)
- [ ] Verify reload with invalid JSON preserves previous fixtures2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| |||
0 commit comments