Skip to content

fix: resolve failing tests and type errors - #307

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-908-1794646299
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-908-1794646299

Conversation

@stooit

@stooit stooit commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • shared: implement paginate (1-indexed pages, totalPages = ceil(total/size), empty data out of range); rename User.userName → username to match API/tests.
  • api: add missing badRequest import in routes/users.ts; fix publicMethods case bug ("post" → "POST") in auth middleware.
  • tsconfig.json: add "types": ["bun-types"] (already installed; no new deps) to resolve bun:test/process type errors.

Verified: bun test 22/22 pass, tsc --noEmit clean. No test files modified.

Assumptions / notes

  • POST being unauthenticated is the documented & tested intent (auth.ts docblock, auth.test.ts). Reviewer flagged this as a design concern for real services (unauthenticated writes; authorId from body).
  • Follow-ups not done (out of scope): input validation in paginate for size<1/page<1; hardcoded "test-token" fallback in auth; unpinned bun-types: latest; stale BUG/TODO comments.

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