Skip to content

Fix CI typecheck blindspot - #440

Open
Peolite001 wants to merge 1 commit into
AnchorNet-Org:mainfrom
Peolite001:fix-ci-typecheck
Open

Fix CI typecheck blindspot#440
Peolite001 wants to merge 1 commit into
AnchorNet-Org:mainfrom
Peolite001:fix-ci-typecheck

Conversation

@Peolite001

Copy link
Copy Markdown

Closes #425

Description

This PR introduces a dedicated type-checking gate (tsc --noEmit) to our CI pipeline and resolves 9 previously undetected type errors in our test files.

Previously, CI relied on next build for type-checking, which only covers modules reachable from the application's build graph, creating a blind spot where test files were silently failing type checks.

Changes included:

  • Added typecheck script: Introduced "typecheck": "tsc --noEmit" to package.json.
  • Updated CI pipeline: Added a standalone "Typecheck" step to .github/workflows/ci.yml before the build step.
  • Fixed type errors in test files:
    • MetricsBar.test.tsx: Added missing reload, mutate, and pendingSettlements properties to the mocked useAsync return values.
    • SettlementTable.test.tsx: Fixed DOM element typecasting by asserting queried nodes as HTMLElement so that @testing-library's within function compiles correctly.

We adopted a "fix-then-gate" approach since there were only 9 errors across 2 files, allowing us to lock down the test file contracts immediately without needing exceptions or tsconfig exclusions.

Checklist

  • I added a CHANGELOG.md entry under the next ## [x.y.z] section
    (see the Format note at the top of CHANGELOG.md), or this PR
    is docs-only / test-only / internal tooling and doesn't change
    user-facing behavior. (Note: This PR is test/tooling-only).
  • Tests added/updated for the change.

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.

CI never runs tsc --noEmit — 9 type errors live undetected in test files because next build does not type-check them

1 participant