ci(test-core): typecheck test files in CI#809
Conversation
Test code had no type gate. `yarn build` typechecks with tsconfig.prod.json, which excludes **/*.test.ts; `yarn test` runs through a type-stripping loader. So a type error in a .test.ts (e.g. a mock missing a newly-required interface field) passed every PR check and only surfaced if someone ran the test-inclusive `tsc` by hand. Add a `typecheck` script (`tsc --noEmit -p tsconfig.json`, which includes tests) and run it in test-core.yml between lint and test. The current tree already passes it (0 errors), so this is a pure gate addition with no cleanup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XQPK4TXcVoXoyFp6sNW2Lr
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a ChangesCI Typecheck Addition
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #809 +/- ##
===========================================
+ Coverage 78.65% 78.77% +0.12%
===========================================
Files 132 132
Lines 49980 50093 +113
Branches 3763 3781 +18
===========================================
+ Hits 39312 39461 +149
+ Misses 10620 10584 -36
Partials 48 48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
Adds a
typecheckscript (tsc --noEmit -p tsconfig.json) and runs it intest-core.ymlbetweenlint:checkandtest:ci.Why
Test code currently has no type gate. Two facts combine into a blind spot:
yarn buildtypechecks withtsconfig.prod.json, which excludes**/*.test.ts.yarn testruns through a type-stripping loader (no typecheck).So a type error in a
.test.ts— e.g. a mock object missing a newly-required interface field — passes every PR check and only surfaces if someone runs the test-inclusivetscby hand. This was hit for real while developing the chunk-fanout work: extendingBroadcastChunkResultsilently broke 5 typed mocks inrebroadcasting-chunk-source.test.ts, green across all of CI.Scope
Pure gate addition — the current tree already passes
yarn typecheckwith 0 errors, so there's no cleanup tail.yarn buildstill owns emit; this is a fast no-emit check that simply includes tests.🤖 Generated with Claude Code