Skip to content

chore(app): unit tests are found by pattern, so the test script stops conflicting - #112

Merged
sean-brydon merged 1 commit into
mainfrom
chore/test-glob
Oct 14, 2026
Merged

sean-brydon merged 1 commit into
mainfrom
chore/test-glob

Conversation

@sean-brydon

Copy link
Copy Markdown
Collaborator

app/package.json's "test" script listed every unit test file by hand. Every branch that added a test conflicted with every other branch that did. Worse, resolving those conflicts quietly dropped files: on main right now, four test files never run.

File Tests
src/lib/art/mermaid.test.ts 10
src/lib/code-blocks.test.ts 9
src/lib/box-routes.test.ts 2
src/lib/skills-notice-model.test.ts 24

All 45 pass.

Now the script is node --experimental-strip-types --test 'src/lib/**/*.test.ts'. Node 22, which CI uses, expands the quoted pattern itself, so it works the same in any shell. All 66 unit test files live under src/lib. src/themes/contrast.test.ts stays out on purpose, because check:themes runs it.

Proof

Files Tests
Old list, on main 62 452 pass
Pattern 66 486 pass, 0 fail
Each file run on its own, summed 66 486

The pattern runs every file exactly once.

Also:

  • AGENTS.md now says new tests go in app/src/lib/ as *.test.ts, with no list to edit.
  • The integrate-branches skill no longer lists the test script as a usual conflict.

Open #110 adds header-picture.test.ts to the old list, so it will conflict on this one line. Resolve it by taking this side; the file is found by the pattern.

🤖 Generated with Claude Code

… conflicting

The test script listed every file by hand, so every branch that added a test
conflicted with every other, and resolving those conflicts dropped files: four
(mermaid, code-blocks, box-routes, skills-notice-model, 45 tests) had stopped
running. `pnpm test` now runs src/lib/**/*.test.ts; the theme contrast test
stays with check:themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
berth Ready Ready Preview Oct 14, 2026 5:06pm UTC
berth-docs Ready Ready Preview Oct 14, 2026 5:06pm UTC

Request Review

@sean-brydon
sean-brydon merged commit fc6ca3c into main Oct 14, 2026
8 checks passed
@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

ENG-6098

This branch was successfully deployed

2 active deployments
Preview – berth-docs — 4aaac690 Deployed Oct 14, 2026 by vercel[bot]
Preview – berth — 4aaac690 Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant