Skip to content

[Testing 05] test: minimal vitest harness for backend and frontend - #228

Merged
willchen96 merged 1 commit into
Open-Legal-Products:mainfrom
amal66:olp-pr/test-harness
Jul 21, 2026
Merged

[Testing 05] test: minimal vitest harness for backend and frontend#228
willchen96 merged 1 commit into
Open-Legal-Products:mainfrom
amal66:olp-pr/test-harness

Conversation

@amal66

@amal66 amal66 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

The minimal vitest harness from the reference index (#205, row amal66#24): a test script and vitest dev-dependency in both backend/ and frontend/, with one seed suite per package. This is the base of a small testing series — every other test PR in the series rides on it.

Changes

  • backend/package.json / frontend/package.json"test": "vitest run" + vitest ^4.1.9 dev-dependency; lockfiles regenerated against current main.
  • backend/tsconfig.json — excludes *.test.ts / __tests__/ from the production tsc build.
  • Seed suites: backend/src/lib/__tests__/downloadTokens.test.ts (12 tests) and frontend/src/app/lib/utils.test.ts (8 tests).

Why

The repo has no test runner today, so no PR can carry tests. This adds the smallest possible harness — dev-deps only, no config beyond the tsconfig exclude, no CI coupling — so subsequent PRs (and community PRs) can add suites incrementally.

Testing

  • npm test --prefix backend — 12/12 passing.
  • npm test --prefix frontend — 8/8 passing.
  • npm run build --prefix backend — passes (test files excluded from the build).

Relationship to other open PRs

  • [Security 11] Server-side hardening pack  #227 (security pack) folds this same harness in as its first commit; whichever merges first, the other rebases to a no-op. Kept standalone here so the testing series doesn't depend on the security review.
  • Follow-up PRs in this series (unit tests, integration tests, frontend component tests, evals, CI, contributor docs) each base on this branch; until they can be stacked properly (Graphite, needs write access), they include this commit — review only their top commit.

🤖 Generated with Claude Code

Ported from #24 onto current main; lockfiles regenerated against
this tree. Adds vitest as a dev dependency with a `test` script in both
packages, excludes test files from the backend tsc build, and seeds one
suite per package (backend: downloadTokens, 12 tests; frontend: cn() utils,
8 tests). Verified locally: backend 12/12, frontend 8/8 passing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@amal66 amal66 changed the title test: minimal vitest harness for backend and frontend [Test 05] test: minimal vitest harness for backend and frontend Jul 21, 2026
@amal66 amal66 changed the title [Test 05] test: minimal vitest harness for backend and frontend [Testing 05] [Test 05] test: minimal vitest harness for backend and frontend Jul 21, 2026
@amal66 amal66 changed the title [Testing 05] [Test 05] test: minimal vitest harness for backend and frontend [Testing 05] test: minimal vitest harness for backend and frontend Jul 21, 2026
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.

2 participants