Skip to content

fix: resolve failing tests and type errors - #203

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2242-1790583762
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2242-1790583762

Conversation

@stooit

@stooit stooit commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • shared/pagination: implemented paginate (slice by page/size, totalPages = ceil(total/size), empty for out-of-range pages, guards size<=0).
  • shared/types: renamed User.userName → username to match api routes and tests.
  • api/routes/users: added missing badRequest import (was a runtime ReferenceError on invalid POST).
  • api/middleware/auth: fixed method case-sensitivity bug ("post" vs "POST"); public methods now compared via uppercase Set.
  • tsconfig: added "types": ["bun-types"] (already a devDependency) so bun:test and process resolve.

Verification

bun test → 22 pass / 0 fail; tsc --noEmit → clean.

Assumptions

  • Unauthenticated POST /users is intended behaviour, as asserted by auth.test.ts.
  • @types/node resolves transitively via bun-types; no new dependencies added. No test files modified.

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