Cleanup#99
Conversation
📝 WalkthroughWalkthroughThis PR applies a coordinated monorepo release cycle: normalizing all README workflow path references from Windows to POSIX style, bumping versions across all package manifests, clarifying root documentation types, fixing core library test naming, applying targeted behavioral improvements to for-await-of and for-in modules, correcting code example syntax, and refactoring ReplaySubject constructor logic with validation tests. ChangesObservable Monorepo Release
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
replay-subject/mod.test.ts (1)
449-463: ⚡ Quick winUse explicit Arrange/Act/Assert sections in the two new constructor tests.
These tests are correct functionally, but they should follow the required AAA structure for consistency with the repo’s test standard.
♻️ Suggested update
Deno.test("ReplaySubject.constructor should throw when called with no arguments", () => { + // Arrange + const constructWithoutArgs = () => + new ReplaySubject(...([] as unknown as ConstructorParameters<typeof ReplaySubject>)); + + // Act / Assert assertThrows( - () => new ReplaySubject(...([] as unknown as ConstructorParameters<typeof ReplaySubject>)), + constructWithoutArgs, TypeError, "1 argument required but 0 present", ); }); Deno.test("ReplaySubject.constructor should throw when count is not a number", () => { + // Arrange + const constructWithInvalidCount = () => new ReplaySubject("3" as unknown as number); + + // Act / Assert assertThrows( - () => new ReplaySubject("3" as unknown as number), + constructWithInvalidCount, TypeError, "Parameter 1 is not of type 'Number'", ); });As per coding guidelines
**/*.test.ts: Use Arrange/Act/Assert pattern with Deno.test for test cases.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@replay-subject/mod.test.ts` around lines 449 - 463, Split each of the two constructor tests for ReplaySubject into explicit Arrange/Act/Assert sections: for the "should throw when called with no arguments" test, Arrange any needed setup (none), Act by invoking new ReplaySubject(...([] as unknown as ConstructorParameters<typeof ReplaySubject>)) inside a closure, and Assert by calling assertThrows with that closure, the expected TypeError and message; similarly for the "should throw when count is not a number" test, arrange the invalid argument ("3" as unknown as number), act by invoking new ReplaySubject with it inside a closure, and assert with assertThrows expecting TypeError and the "Parameter 1 is not of type 'Number'" message—keep the existing test names and assertions but reorganize into clear Arrange / Act / Assert comment blocks or logical sections within the Deno.test callbacks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@replay-subject/mod.test.ts`:
- Around line 449-463: Split each of the two constructor tests for ReplaySubject
into explicit Arrange/Act/Assert sections: for the "should throw when called
with no arguments" test, Arrange any needed setup (none), Act by invoking new
ReplaySubject(...([] as unknown as ConstructorParameters<typeof ReplaySubject>))
inside a closure, and Assert by calling assertThrows with that closure, the
expected TypeError and message; similarly for the "should throw when count is
not a number" test, arrange the invalid argument ("3" as unknown as number), act
by invoking new ReplaySubject with it inside a closure, and assert with
assertThrows expecting TypeError and the "Parameter 1 is not of type 'Number'"
message—keep the existing test names and assertions but reorganize into clear
Arrange / Act / Assert comment blocks or logical sections within the Deno.test
callbacks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f4bdba2b-b5ea-433a-af8b-f329af4a185a
📒 Files selected for processing (112)
README.mdall/README.mdall/deno.jsonasync-await/README.mdasync-await/deno.jsonat/README.mdat/deno.jsonaudit/deno.jsonaudit/readme.mdbehavior-subject/README.mdbehavior-subject/deno.jsonbroadcast-subject/README.mdbroadcast-subject/deno.jsoncatch-error/README.mdcatch-error/deno.jsoncore/README.mdcore/deno.jsoncore/observable.test.tscore/observer.test.tscore/subject.test.tsdebounce/README.mddebounce/deno.jsondefer/README.mddefer/deno.jsondelay/README.mddelay/deno.jsondelay/mod.tsdistinct-until-changed/README.mddistinct-until-changed/deno.jsondistinct-until-changed/mod.tsdistinct/README.mddistinct/deno.jsondrop/README.mddrop/deno.jsonempty/README.mdempty/deno.jsonexhaust-map/README.mdexhaust-map/deno.jsonexpand/README.mdexpand/deno.jsonfetch/README.mdfetch/deno.jsonfilter/README.mdfilter/deno.jsonfinalize/README.mdfinalize/deno.jsonflat-map/README.mdflat-map/deno.jsonflat/README.mdflat/deno.jsonfor-await-of/README.mdfor-await-of/deno.jsonfor-await-of/mod.tsfor-in/README.mdfor-in/deno.jsonfor-in/mod.test.tsfor-of/README.mdfor-of/deno.jsonfrom/README.mdfrom/deno.jsoninterval/README.mdinterval/deno.jsonkeep-alive/README.mdkeep-alive/deno.jsonlast-value-from/README.mdlast-value-from/deno.jsonmap/README.mdmap/deno.jsonmaterialize/README.mdmaterialize/deno.jsonmerge-map/README.mdmerge-map/deno.jsonmerge/README.mdmerge/deno.jsonnever/README.mdnever/deno.jsonof/README.mdof/deno.jsonpairwise/README.mdpairwise/deno.jsonpipe/README.mdpipe/deno.jsonrace/README.mdrace/deno.jsonreduce/README.mdreduce/deno.jsonrepeat/README.mdrepeat/deno.jsonreplay-subject/README.mdreplay-subject/deno.jsonreplay-subject/mod.test.tsreplay-subject/mod.tsrxjs-interop/README.mdrxjs-interop/deno.jsonscan/README.mdscan/deno.jsonshare/README.mdshare/deno.jsonswitch-map/README.mdswitch-map/deno.jsontake/README.mdtake/deno.jsontap/README.mdtap/deno.jsonthrottle/README.mdthrottle/deno.jsonthrow-error/README.mdthrow-error/deno.jsontimeout/README.mdtimeout/deno.jsonuntil/README.mduntil/deno.json
Summary by CodeRabbit
Bug Fixes
Documentation
Chores