.http and .hitspec files for changes and automatically re-runs tests when a file is saved. This creates a fast feedback loop during API development.
Usage
How It Works
- hitspec runs all matching tests once
- It then watches the directories containing your test files
- When a
.httpor.hitspecfile is modified, tests re-run automatically - Press
Ctrl+Cto stop watching
Combining with Filters
Combine watch mode with filters for focused development:Debouncing
hitspec debounces file change events with a 300ms delay. Rapid consecutive saves (e.g., from auto-formatting) only trigger a single test re-run.Output in Watch Mode
Each re-run creates fresh output. For structured formats (JSON, JUnit), the formatter is re-initialized on each change so you always get complete, valid output.Watch mode currently watches directories containing your test files. Changes to environment files (
hitspec.yaml, .env) do not trigger re-runs — restart the command to pick up config changes.