feat(watch mode): Add watch mode support with CLI options and enhanced documentation
This commit is contained in:
@@ -217,6 +217,33 @@ The Enhanced Communication system has been implemented to provide rich, real-tim
|
||||
- Parser handles events asynchronously for real-time updates
|
||||
- Visual diffs are generated using custom diff algorithms for each data type
|
||||
|
||||
## Watch Mode (Phase 4)
|
||||
|
||||
tstest now supports watch mode for automatic test re-runs on file changes.
|
||||
|
||||
### Usage
|
||||
```bash
|
||||
tstest test/**/*.ts --watch
|
||||
tstest test/specific.ts -w
|
||||
```
|
||||
|
||||
### Features
|
||||
- **Automatic Re-runs**: Tests re-run when any watched file changes
|
||||
- **Debouncing**: Multiple rapid changes are batched (300ms delay)
|
||||
- **Clear Output**: Console is cleared before each run for clean results
|
||||
- **Status Updates**: Shows which files triggered the re-run
|
||||
- **Graceful Exit**: Press Ctrl+C to stop watching
|
||||
|
||||
### Options
|
||||
- `--watch` or `-w`: Enable watch mode
|
||||
- `--watch-ignore`: Comma-separated patterns to ignore (e.g., `--watch-ignore node_modules,dist`)
|
||||
|
||||
### Implementation Details
|
||||
- Uses `@push.rocks/smartchok` for cross-platform file watching
|
||||
- Watches the entire project directory from where tests are run
|
||||
- Ignores changes matching the ignore patterns
|
||||
- Shows "Waiting for file changes..." between runs
|
||||
|
||||
## Fixed Issues
|
||||
|
||||
### tap.skip.test(), tap.todo(), and tap.only.test() (Fixed)
|
||||
|
Reference in New Issue
Block a user