Skip to content

tests/api/helpers.ts's shared request-builder helper types its body parameter as any #1985

Description

@1nonlypiece

tests/api/helpers.ts, the shared helper imported across many tests/api/*.test.ts files, declares its request body parameter as body?: any (line 10). Because this helper is reused so broadly, this single any silently disables type checking on the request bodies constructed in every test file that uses it, including ones that would otherwise benefit from catching a typo'd field name against the route's real input schema at compile time. Acceptance criteria: change the parameter to body?: unknown (or a generic <T> threaded through to callers), and fix any call sites that then reveal a real type mismatch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions