test(hot): reach 100% of the client, off the deprecated statsOptions - #2402
Conversation
The overlay's payload test drove hot.statsOptions, which is deprecated and must not be what a test documents. It now sets stats: "errors-only", the option that governs this, which needed a stats passthrough in the e2e helper. Three more browser cases close what was reachable: restyling a card that is already open, an empty problem string through the encoder, and Escape pressed inside the overlay frame rather than on the host page. What is left cannot be produced from a browser, so it is marked with the reason rather than faked: paging and rendering without a problem set, a label the document-less guard already covers, hot.check() rejecting while the runtime is in abort/fail, an applied update that renews nothing, and an error event queued behind close(). client-src is at 100% of statements and 92.23% of branches.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe change adds Istanbul coverage exclusions and explanatory comments to client-side guard branches without changing runtime behavior. The test helper now forwards an optional Merge Risk: ⚪ Minimal · up to This PR updates browser coverage and test configuration without changing production behavior or public APIs, so no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. 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 @@
## main #2402 +/- ##
==========================================
+ Coverage 96.35% 97.09% +0.73%
==========================================
Files 12 12
Lines 1675 1653 -22
==========================================
- Hits 1614 1605 -9
+ Misses 61 48 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
The overlay's payload test drove
hot.statsOptions, which is deprecated and should not be what a test documents; it now setsstats: "errors-only", the option that governs this since #2392. That needed astatspassthrough in the e2e helper.Three more browser cases close what was reachable in
client-src: restyling a card that is already open, an empty problem string through the HTML encoder, and Escape pressed inside the overlay frame rather than on the host page. What remains cannot be produced from a browser, so it carries anistanbul ignorewith the reason instead of a contrived test — paging and rendering without a problem set, a label the document-less guard already covers,hot.check()rejecting while the runtime is inabort/fail, an applied update that renews nothing, and anerrorevent queued behindclose().client-srcgoes from 97.88% to 100% of statements and 89.26% to 92.23% of branches, measured from the browser suite alone.What kind of change does this PR introduce?
test
Did you add tests for your changes?
Yes — three cases in
test/e2e/overlay.test.js, plus the converted payload test.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
n/a
Use of AI
AI was used. Claude Code converted the deprecated-option test, wrote the three browser cases, classified the remaining branches as reachable or not, and drafted this description; every number above comes from running the suite.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KUpsHWHZG2FxHzJxRUvVv3
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
stats: "errors-only"configuration.Tests