Enable focused tests as repository pre-commit hook

This commit is contained in:
Frank
2026-08-25 16:18:01 -07:00
parent 63ff1b6b43
commit 8c8c3f7cd0
4 changed files with 24 additions and 5 deletions
+12 -5
View File
@@ -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