Enable focused tests as repository pre-commit hook
This commit is contained in:
@@ -22,11 +22,18 @@ For normal commits, use the focused wrapper:
|
||||
```
|
||||
|
||||
It reads staged paths with `git diff --cached` and runs only the mapped Bats
|
||||
files. Use `--list` to inspect the selection without running tests, or
|
||||
`--paths FILE ...` to preview a mapping. Shared test infrastructure and
|
||||
unmapped paths fail closed rather than silently skipping coverage. Run the
|
||||
full suite with `./tests/run.sh` when changing shared test helpers, the test
|
||||
runner, or when focused coverage is not sufficient.
|
||||
files. The tracked `.githooks/pre-commit` hook invokes this wrapper. Enable the
|
||||
repository hook path once per checkout:
|
||||
|
||||
```bash
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
Use `--list` to inspect the selection without running tests, or `--paths FILE
|
||||
...` to preview a mapping. Shared test infrastructure and unmapped paths fail
|
||||
closed rather than silently skipping coverage. Run the full suite with
|
||||
`./tests/run.sh` when changing shared test helpers, the test runner, or when
|
||||
focused coverage is not sufficient.
|
||||
|
||||
## Red-Green
|
||||
|
||||
|
||||
Reference in New Issue
Block a user