Skip to content

fix: resolve failing tests and type errors - #295

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-924-1794461892
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-924-1794461892

Conversation

@stooit

@stooit stooit commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • shared: implement paginate per its test; rename User.userName → username to match api usage/tests.
  • api: import missing badRequest in users route; fix auth middleware public-methods list ("post" → "POST") so it matches c.req.method.
  • tsconfig.json: add "types": ["bun-types"] (already installed) so bun:test and process type-check.

Result: bun test 22 pass / 0 fail; tsc --noEmit clean. No test files modified, no deps added.

Assumptions / notes for reviewers

  • POST being public is the documented design (auth.ts policy comment, README, auth.test.ts expects unauthenticated POST → 201). Note this permits unauthenticated writes and author spoofing on /posts — fine for this corpus, not for production.
  • paginate doesn't validate page < 1 / size < 1 / non-integers; no route uses it yet and tests don't cover it.
  • Pre-existing: API_TOKEN falls back to hard-coded "test-token"; HEAD isn't public. Left unchanged (out of scope).
  • Stale "BUG" comments in auth.ts / users.ts / types.ts / pagination.ts now describe fixed issues and could be removed in a follow-up.

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