fix: resolve TypeScript type errors and add tsc check to CI#41
Merged
Conversation
…k to CI - Fix PrismaClient import path in mock (use @/generated/prisma/client) - Fix NODE_ENV read-only assignment in api-handler and cookie-utils tests - Fix AgentAuthContext → UserAuthContext type mismatch in auth tests - Fix never/null type inference in event-bus tests - Remove non-existent userUuid/agentUuid properties from AuthContext in assignment tests - Fix invalid TargetType literal in comment service test - Add `npx tsc --noEmit` step to GitHub Actions CI workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Coverage Report
File CoverageNo changed files found. |
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
tsc --noEmittype errors across 7 test files and 1 mock filenpx tsc --noEmitstep to GitHub Actions CI workflow (runs after Prisma generate, before tests)Changed files
.github/workflows/test.ymlType checkstep withnpx tsc --noEmitsrc/lib/__mocks__/prisma.ts@prisma/client→@/generated/prisma/clientsrc/lib/__tests__/api-handler.test.tsprocess.envto bypassNODE_ENVread-onlysrc/lib/__tests__/auth.test.tsas unknown as UserAuthContextfor agent mock values passed togetUserSessionFromRequestsrc/lib/__tests__/cookie-utils.test.tsRecord<string, string | undefined>alias forprocess.envmutationssrc/lib/__tests__/event-bus.test.tsmessageHandlercallssrc/services/__tests__/assignment.service.test.tsuserUuid/agentUuidproperties not inAuthContext(12 occurrences)src/services/__tests__/comment.service.test.ts"unknown"to"task"for invalidTargetTypetestTest plan
npx tsc --noEmitpasses locally with 0 errorsGenerated with Claude Code