fix(tests): exclude .claude/worktrees/ from test-file discovery
find-based discovery in run-bats.sh and run-tests.sh picked up test files nested inside on-disk git worktree checkouts under .claude/worktrees/ (untracked, created by background agent isolation), whose submodule-based test_helper isn't initialized there — causing spurious pre-push failures unrelated to any real change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ mapfile -t TEST_FILES < <(
|
||||
find "$REPO_ROOT" -name "*.bats" \
|
||||
-not -path "*/tests/bats/*" \
|
||||
-not -path "*/test_helper/*" \
|
||||
-not -path "*/.claude/worktrees/*" \
|
||||
| sort
|
||||
)
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ run_bats
|
||||
mapfile -t SCRIPTS < <(
|
||||
find "$SEARCH_ROOT" -name "test-*.sh" \
|
||||
-not -path "*/.git/*" \
|
||||
-not -path "*/.claude/worktrees/*" \
|
||||
| sort
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user