From 2c8e8f72fd0de0c90beec114f823d512cdb9a370 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 21 Mar 2026 10:18:25 -0700 Subject: [PATCH] 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) --- package.json | 4 ++-- test/skill-e2e.test.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 2bf4a238..1bddbb92 100644 --- a/package.json +++ b/package.json @@ -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: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:e2e": "EVALS=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 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 --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:all": "EVALS=1 EVALS_ALL=1 bun test test/codex-e2e.test.ts", "skill:check": "bun run scripts/skill-check.ts", diff --git a/test/skill-e2e.test.ts b/test/skill-e2e.test.ts index 27fd9f6e..2c63a4cc 100644 --- a/test/skill-e2e.test.ts +++ b/test/skill-e2e.test.ts @@ -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 {} }); - testIfSelected('design-consultation-core', async () => { + testConcurrentIfSelected('design-consultation-core', async () => { const result = await runSkillTest({ 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. @@ -2293,7 +2293,7 @@ Write DESIGN.md and CLAUDE.md (or update it) in the working directory.`, } }, 420_000); - testIfSelected('design-consultation-research', async () => { + testConcurrentIfSelected('design-consultation-research', async () => { // Test WebSearch integration — research phase only, no DESIGN.md generation 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 {} }, 120_000); - testIfSelected('design-consultation-existing', async () => { - // Pre-create a minimal DESIGN.md + testConcurrentIfSelected('design-consultation-existing', async () => { + // Pre-create a minimal DESIGN.md (independent of core test) fs.writeFileSync(path.join(designDir, 'DESIGN.md'), `# Design System — CivicPulse ## Typography @@ -2387,7 +2387,7 @@ Skip research. Skip font preview. Skip any AskUserQuestion calls — this is non } }, 420_000); - testIfSelected('design-consultation-preview', async () => { + testConcurrentIfSelected('design-consultation-preview', async () => { // Test preview HTML generation only — no DESIGN.md (covered by core test) const previewDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-preview-'));