Skip to content

fix: resolve all failing tests across api and shared packages#27

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier2-2413-1779835693
Open

fix: resolve all failing tests across api and shared packages#27
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier2-2413-1779835693

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 26, 2026

Summary

  • Auth middleware case-sensitivity: Fixed HTTP method comparison in publicMethods array — changed "post" to "POST" since Hono provides uppercase methods per RFC 7231
  • Missing import: Added badRequest to the import from ../lib/errors in users route handler
  • Field name inconsistency: Renamed userNameusername in the shared User type to match test expectations
  • Pagination utility: Implemented the paginate function (was a stub throwing "not implemented") — returns { data, page, pageSize, total, totalPages }
  • TypeScript config: Added skipLibCheck: true to resolve process type errors without adding new dependencies

Verification

All 22 tests pass (bun test). The only remaining tsc --noEmit errors are bun:test module declarations in test files (Bun built-in, not resolvable without modifying test files or adding dependencies).

Assumptions

  • Test files are the source of truth and must not be modified
  • No new dependencies may be added
  • The bun:test TypeScript errors in test files are acceptable (Bun runtime resolves them)

- Fix auth middleware case-sensitivity: HTTP methods are uppercase per RFC 7231
- Add missing badRequest import in users route handler
- Rename User.userName to User.username for consistency with tests
- Implement paginate utility (was a stub throwing 'not implemented')
- Add skipLibCheck to tsconfig.json to resolve process type errors
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