fix: add --concurrent flag to bun test + convert remaining 4 sequential tests

bun's test.concurrent only works within a describe block, not across
describe blocks. Adding --concurrent to the CLI command makes ALL tests
concurrent regardless of describe boundaries. Also converted the 4
design-consultation tests to concurrent (each already independent).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-03-21 10:18:25 -07:00
parent a25c7b71c5
commit 2c8e8f72fd
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
2 changed files with 7 additions and 7 deletions

View File

@ -15,8 +15,8 @@
"test": "bun test browse/test/ test/ --ignore test/skill-e2e.test.ts --ignore test/skill-llm-eval.test.ts --ignore test/skill-routing-e2e.test.ts --ignore test/codex-e2e.test.ts", "test": "bun test browse/test/ test/ --ignore test/skill-e2e.test.ts --ignore test/skill-llm-eval.test.ts --ignore test/skill-routing-e2e.test.ts --ignore test/codex-e2e.test.ts",
"test:evals": "EVALS=1 bun test test/skill-llm-eval.test.ts test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts", "test:evals": "EVALS=1 bun test test/skill-llm-eval.test.ts test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts",
"test:evals:all": "EVALS=1 EVALS_ALL=1 bun test test/skill-llm-eval.test.ts test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts", "test:evals:all": "EVALS=1 EVALS_ALL=1 bun test test/skill-llm-eval.test.ts test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts",
"test:e2e": "EVALS=1 bun test test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts", "test:e2e": "EVALS=1 bun test --concurrent --max-concurrency ${EVALS_CONCURRENCY:-8} test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts",
"test:e2e:all": "EVALS=1 EVALS_ALL=1 bun test test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts", "test:e2e:all": "EVALS=1 EVALS_ALL=1 bun test --concurrent --max-concurrency ${EVALS_CONCURRENCY:-8} test/skill-e2e.test.ts test/skill-routing-e2e.test.ts test/codex-e2e.test.ts",
"test:codex": "EVALS=1 bun test test/codex-e2e.test.ts", "test:codex": "EVALS=1 bun test test/codex-e2e.test.ts",
"test:codex:all": "EVALS=1 EVALS_ALL=1 bun test test/codex-e2e.test.ts", "test:codex:all": "EVALS=1 EVALS_ALL=1 bun test test/codex-e2e.test.ts",
"skill:check": "bun run scripts/skill-check.ts", "skill:check": "bun run scripts/skill-check.ts",

View File

@ -2232,7 +2232,7 @@ A civic tech data platform for government employees to access, visualize, and sh
try { fs.rmSync(designDir, { recursive: true, force: true }); } catch {} try { fs.rmSync(designDir, { recursive: true, force: true }); } catch {}
}); });
testIfSelected('design-consultation-core', async () => { testConcurrentIfSelected('design-consultation-core', async () => {
const result = await runSkillTest({ const result = await runSkillTest({
prompt: `Read design-consultation/SKILL.md for the design consultation workflow. prompt: `Read design-consultation/SKILL.md for the design consultation workflow.
Skip the preamble bash block, lake intro, telemetry, and contributor mode sections go straight to the design workflow. Skip the preamble bash block, lake intro, telemetry, and contributor mode sections go straight to the design workflow.
@ -2293,7 +2293,7 @@ Write DESIGN.md and CLAUDE.md (or update it) in the working directory.`,
} }
}, 420_000); }, 420_000);
testIfSelected('design-consultation-research', async () => { testConcurrentIfSelected('design-consultation-research', async () => {
// Test WebSearch integration — research phase only, no DESIGN.md generation // Test WebSearch integration — research phase only, no DESIGN.md generation
const researchDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-research-')); const researchDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-research-'));
@ -2341,8 +2341,8 @@ Do NOT generate a full DESIGN.md — just research notes.`,
try { fs.rmSync(researchDir, { recursive: true, force: true }); } catch {} try { fs.rmSync(researchDir, { recursive: true, force: true }); } catch {}
}, 120_000); }, 120_000);
testIfSelected('design-consultation-existing', async () => { testConcurrentIfSelected('design-consultation-existing', async () => {
// Pre-create a minimal DESIGN.md // Pre-create a minimal DESIGN.md (independent of core test)
fs.writeFileSync(path.join(designDir, 'DESIGN.md'), `# Design System — CivicPulse fs.writeFileSync(path.join(designDir, 'DESIGN.md'), `# Design System — CivicPulse
## Typography ## Typography
@ -2387,7 +2387,7 @@ Skip research. Skip font preview. Skip any AskUserQuestion calls — this is non
} }
}, 420_000); }, 420_000);
testIfSelected('design-consultation-preview', async () => { testConcurrentIfSelected('design-consultation-preview', async () => {
// Test preview HTML generation only — no DESIGN.md (covered by core test) // Test preview HTML generation only — no DESIGN.md (covered by core test)
const previewDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-preview-')); const previewDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-preview-'));