Skip to content

test(shared): extract push fixtures to shared module#48

Merged
bolin8017 merged 1 commit into
mainfrom
test/shared-fixtures
Apr 18, 2026
Merged

test(shared): extract push fixtures to shared module#48
bolin8017 merged 1 commit into
mainfrom
test/shared-fixtures

Conversation

@bolin8017
Copy link
Copy Markdown
Owner

Summary

Extracts duplicated `makeUser` / `makeProblem` / `makeChannel` factories into `packages/shared/src/tests/fixtures.ts`. Also adds `makePushMessage` for PushMessage construction. `push.pipeline.test.ts` migrated; other suites can follow incrementally.

Test plan

  • `pnpm --filter @caffecode/shared build` — clean
  • `pnpm --filter @caffecode/shared test` — 188/188 pass

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

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

Project Deployment Actions Updated (UTC)
caffecode Ready Ready Preview, Comment Apr 18, 2026 3:18am

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

📊 Coverage Report

Package Statements Branches Functions Lines
shared 92.22% ❌ (≥95%) 87.74% ❌ (≥90%) 96.87% ✅ (≥95%) 91.88% ❌ (≥95%)
web 95.47% ✅ (≥90%) 90.75% ✅ (≥85%) 96.42% ✅ (≥90%) 96.18% ✅ (≥90%)

🤖 Generated by CI · thresholds enforced via vitest

…fixtures.ts

The `makeUser`, `makeProblem`, `makeChannel` helpers were duplicated
across push pipeline test files. Hoisted to a shared fixtures module
so a schema change only touches one file instead of every suite.

push.pipeline.test.ts migrated to use the shared fixtures. Other test
files (push.pipeline.paused.test.ts, push.worker.test.ts) construct
their own specialised mocks and are left untouched for now — they
can migrate incrementally without a forcing function.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bolin8017 bolin8017 force-pushed the test/shared-fixtures branch from 2c8de68 to a8faef2 Compare April 18, 2026 03:17
@bolin8017 bolin8017 merged commit 4e6a139 into main Apr 18, 2026
2 of 3 checks passed
@bolin8017 bolin8017 deleted the test/shared-fixtures branch April 18, 2026 03:18
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