Repository navigation
Type-check test files with Jest types - #168
Merged
Merged
Conversation
Install @types/jest so test files see Jest globals. Fifteen test files now type-check without a header; the remaining ones keep @ts-nocheck, reworded to the real reason: untyped test doubles and window.rendererBridge. Drops the two App.test.js baseline lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test files now see Jest globals in the typecheck, so the
@ts-nocheckheader comes off wherever a test is otherwise type-clean.The old header blamed Jest globals; with them typed, the remaining 27 files still hide 77 real errors (mostly
window.rendererBridge, which production code reaches through casts, plus untyped doubles). Fixing those is follow-up work, not this PR.Evidence
typecheck:baselinecarriedApp.test.js: Cannot find name 'it'; 43 test files skipped type checking.After:
typecheck:baselinepasses with those lines gone; 16 test files are type-checked. Lint and jest (111 tests) pass.Merge Danger
Door: two-way
Blast Radius: CI typecheck
A new test that is not type-clean now fails
typecheck:baselineunless it carries the header. Dev dependency only; nothing ships.🤖 Generated with Claude Code