[Testing 05] test: minimal vitest harness for backend and frontend - #228
Merged
Merged
Conversation
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>
This was referenced Jul 20, 2026
willchen96
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The minimal vitest harness from the reference index (#205, row amal66#24): a
testscript and vitest dev-dependency in bothbackend/andfrontend/, 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.9dev-dependency; lockfiles regenerated against currentmain.backend/tsconfig.json— excludes*.test.ts/__tests__/from the productiontscbuild.backend/src/lib/__tests__/downloadTokens.test.ts(12 tests) andfrontend/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
🤖 Generated with Claude Code