Skip to content

fix: resolve failing tests and type errors - #205

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2174-1790698904
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2174-1790698904

Conversation

@stooit

@stooit stooit commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Fixes all failing tests and tsc errors: auth method case normalisation (toUpperCase; lowercase delete/put still require a token), User.userName renamed to username in shared types, fixed missing badRequest in users route, implemented paginate() (size clamped to >=1), wired the already-installed bun-types in tsconfig (no new deps). Result: bun test 22/22 pass, tsc --noEmit clean.

Assumptions: the tests define the correct behaviour (including allowing unauthenticated POST). Found but left unchanged because this repo is a test fixture: a hardcoded token fallback ("test-token" when API_TOKEN is unset), a loosely checked Bearer prefix, a public GET /users that returns every user's email, and weak input validation.

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