test: finish the isolated testing style sweep - #17
Conversation
Both files had a module-scoped window and a read helper; both now sit inside a root describe. The parse messages are worth reading as documentation of the boundary, so each case says which mistake it stands for: the misspelled zone that would otherwise parse as a different schedule, the plausible timezone on a nested leaf, the zone checked when the rule is read rather than when a query needs it.
Rota names come from faker here too, with the rendered timelines interpolating them. Two tests in query.test.ts were byte-identical bodies under different names: "takes the exact equivalent happily" and "measures exact time, so a clock change does not lose an hour" both advanced 24 hours from midnight on 2026-03-29 over an always rule and asserted 01:00 the next day. They are one test now, keeping the better explanation. That is the only test removed in the sweep.
interval-stream and interpret, the last two files. The pull-count assertions in interval-stream stay. Laziness is behaviour, and how far a source was consumed is the only way to see it from outside, so the meter earns its place where a call count would not. Each one now says that in the test. Every test file has a single root describe with nothing above it but imports.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 37 minutes Limit details: You’ve used all 2 included reviews currently available under your plan. You completed 83 included PR reviews in the past 7 days; at that activity level, included reviews refill at 2 reviews per hour. This review is too large to run within your organization's remaining usage spending cap. Raise or remove your spending cap in the billing tab, then retry. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
Finishes the sweep started in #16. The remaining six files are done, so all
thirteen now follow the
isolated-testing-styleskill.The pull-count exception, kept
interval-stream.test.tscounts how far a source was consumed, which reads likethe call-count assertion the skill argues against. It stays, because laziness is
behaviour and consumption is the only way to observe it from outside. Each one
now says so:
One test removed
query.test.tsheld two tests with byte-identical bodies under different names.Both advanced 24 hours from midnight on 2026-03-29 over an
alwaysrule andasserted 01:00 the next morning:
They are one test now, keeping the better explanation. The count goes from 200 to
199 for that reason alone, and it is the only test the sweep removes.
The rest
Same pattern as #16. Given/when/then filled in with the case, module-level
fixtures moved inside a root
describe, and faker for values the assertions donot turn on. The parse messages read as documentation of the boundary, so each
case says which mistake it stands for:
Four lint findings came up and were fixed by naming intermediates rather than by
turning rules off: three
max-nested-callsand oneprefer-structured-cloneona
JSON.parse(JSON.stringify(…))round trip, which is now two named steps.Checks
pnpm checkpasses, and passed at each commit.Behaviour is untouched apart from the duplicate above. No new dependencies here:
faker arrived in #16.