chore: add CI workflow and controller tests#34
Merged
Conversation
- Add vitest with SWC for running tests with decorator support - Add supertest-based CRUD tests for author and book controllers - Add GitHub Actions CI workflow for Node 22/24 - Fix Publisher.ts TDZ issue by moving enum before class - Fix zod param parsing to use z.coerce.number() for string route params - Fix type errors in controllers (Context type, request.body typing) - Export init promise and server from server.ts for test lifecycle - Add .yarnrc.yml with node-modules linker - Add packageManager field and test devDependencies to package.json - Exclude spec files from tsconfig build, add skipLibCheck Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
z.number()→z.coerce.number()for string route params), and TypeScript type errors with koa-router Context andctx.request.bodyinitpromise andserverhandle fromserver.tsfor proper test lifecycle management.yarnrc.yml(node-modules linker),packageManagerfield, and test dependenciesTest plan
yarn buildpassesyarn testpasses (2 test files, 2 tests)🤖 Generated with Claude Code