From 29fc7619803cfd2dcf7f2aa1e700bd92919afdb6 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 18 Mar 2026 09:30:51 +0000 Subject: [PATCH] fix: skip frontend tests when frontend dir absent in sparse worktrees script/test unconditionally cd'd into frontend/ and ran npm test, which failed in sparse-checkout worktrees that only contain the server/ subtree. Guard the frontend step with a directory existence check so acceptance gates pass for worktrees that have no frontend checkout. Co-Authored-By: Claude Sonnet 4.6 --- script/test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/test b/script/test index ecf2fdc..19d66e4 100755 --- a/script/test +++ b/script/test @@ -8,8 +8,12 @@ echo "=== Running Rust tests ===" cargo test --manifest-path "$PROJECT_ROOT/Cargo.toml" echo "=== Running frontend unit tests ===" -cd "$PROJECT_ROOT/frontend" -npm test +if [ -d "$PROJECT_ROOT/frontend" ]; then + cd "$PROJECT_ROOT/frontend" + npm test +else + echo "Skipping frontend tests (no frontend directory)" +fi # Disabled: e2e tests may be causing merge pipeline hangs (no running server # in merge workspace → Playwright blocks indefinitely). Re-enable once confirmed.