Skip to content

npm run typecheck never typechecks middleware/test/ #573

Description

@Weegy

middleware/tsconfig.json has include: ["src/**/*.ts"], so the test/ tree is outside the
project and npm run typecheck never sees it. A type error in a test file passes every gate and only
surfaces when tsx hits it at runtime — or does not surface at all, for a branch the test never
takes.

Noticed during PR #550, where an edited test file had to be typechecked by hand with the repo's own
compiler options to get any coverage at all.

Worth deciding deliberately rather than by omission: either add test/**/*.ts to the project, or add
a second tsconfig.test.json and a typecheck:test script wired into CI. The first is simpler; the
second avoids test types leaking into the shipped build's project graph.

Filed as a follow-up from PR #550 (MCP 2026-07-28 cluster, wave 4-6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions