Skip to content

fix: resolve failing tests and type errors - #200

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2175-1790525911
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2175-1790525911

Conversation

@stooit

@stooit stooit commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • auth middleware: public-method allow-list had "post" instead of "POST", so unauthenticated POST was rejected; also normalises incoming method case.
  • shared types: renamed User.userName → username to match API routes and tests.
  • users route: added missing badRequest import (was a runtime ReferenceError on invalid body).
  • pagination: implemented paginate stub (slice, total, totalPages = ceil(total/size), empty for out-of-range pages; page/size clamped to ≥1).
  • tsconfig: added "types": ["bun-types"] (already a dev dep) so bun:test and process resolve.

Result: bun test 22/22 pass, tsc --noEmit clean.

Assumptions

  • Tests are authoritative (e.g. username field naming, POST being public per auth tests).
  • No test files modified; no dependencies added.

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