Enable focused tests as repository pre-commit hook
This commit is contained in:
@@ -6,6 +6,9 @@ load helpers
|
||||
|
||||
@test "changed-test wrapper is executable and uses staged diff by default" {
|
||||
[ -x "$REPO_ROOT/scripts/test-changed.sh" ]
|
||||
[ -x "$REPO_ROOT/.githooks/pre-commit" ]
|
||||
run grep -F 'scripts/test-changed.sh' "$REPO_ROOT/.githooks/pre-commit"
|
||||
[ "$status" -eq 0 ]
|
||||
run grep -F 'git diff --cached' "$REPO_ROOT/scripts/test-changed.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user