Skip to content

test(typecheck): tests/**/* uncovered by tsc #318

Description

@dean0x

Problem

tsconfig.json:19 sets "include": ["src/**/*"] and vitest.config.ts has no typecheck block. Consequence: nothing in CI typechecks tests/.

This gap surfaced in PR #316 (feat/315-gate-attribution-flag): the headline compile-time guarantee of the EnvBooleanFlagDef | SettingBooleanFlagDef split cannot be locked in with a regression test (// @ts-expect-error), and a stray third argument in a makeTemplate(...) call went unnoticed until resolve pass. Without test typechecking, these slip through.

Current Status

Expected Behavior

  • Typechecker covers both src/**/* and tests/**/*
  • Compile-time guarantees enforced in test assertions
  • Runtime backstops (as Type casts) replaced with // @ts-expect-error regression tests
  • All type errors surfaced by CI before merge

Suggested Approach

Add a tsconfig.test.json (or vitest typecheck block) covering tests/**, run it in CI, and burn down the errors it surfaces.

Acceptance Criteria

  • TypeScript config covers tests/**/*
  • Typecheck runs in CI
  • Test suite passes typecheck without errors
  • Regression test gaps (// @ts-expect-error) documented
  • Runtime casts replaced with compile-time assertions where possible

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt items to address

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions