[Remove] brittle renderer source-text tests - #437
Conversation
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
|
@coderabbitai review |
|
Why
The renderer source-text tests inspect
src/renderer/index.jsximplementation details rather than observable behavior. They break when harmless component refactors change layout or effect declaration structure, while the extracted pure renderer modules already provide stable behavioral coverage.What changes
Remove only tests that read
src/renderer/index.jsxas raw text, including the ordering-only suite whose two tests are entirely source inspections. Keep the pure-module notice and refusal tests; production code and unrelated tests are unchanged.How to test this
Platforms: any — this is unit-test-only maintenance with no user-visible surface.
Starting state:
node --test tests/unit/ticket-trunk-notice.test.cjs tests/unit/trac-ticket-scrape-ordering.test.cjs tests/unit/legacy-site.test.cjs.Expected result: the retained behavioral tests pass; the deleted ordering test file is no longer discovered.
What must not have happened:
No production files or renderer behavior changed, and the pure-module coverage for ticket-trunk and legacy-site notices remains.
Risks and limitations
No user-visible behavior changed. This deliberately removes source-layout coverage for the ticket-card wiring and scrape-effect ordering; those assertions were brittle and cannot exercise
index.jsxbehavior without a DOM harness.Related
Fixes #425
Design decisions and alternatives considered
Kept the behavior tests for
ticket-trunk-notice.cjsandlegacy-site.cjs, which load as pure modules. Did not introduce a DOM harness or move renderer behavior solely to preserve tests, because the issue scope is removal of raw-source inspections.Review outcome (required — see AGENTS.md)
0 [fix here] · 0 [follow-up] — independent five-dimension self-review found no findings.
npm run lintandnpm testboth pass.Implementation notes
Focused retained-test command,
npm run lint, andnpm testpassed locally (1,254 tests).