Cleanup#100
Conversation
…were no more active subscriptions
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR consolidates operator improvements across the observable library: stricter argument validation in ChangesObservable operator improvements
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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.
Actionable comments posted: 3
🤖 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.
Inline comments:
In `@last-value-from/mod.test.ts`:
- Around line 13-18: The test for lastValueFrom(throwError(error)) uses a
try/catch without asserting failure on the success path, which can produce a
false-positive; update the test to either use assertRejects(() =>
lastValueFrom(throwError(error))) or keep the try/catch but add a fail() (or
throw) immediately after the await to ensure the test fails if no rejection
occurs, referencing the lastValueFrom and throwError calls in the test.
In `@reduce/mod.test.ts`:
- Around line 11-57: Refactor each Deno.test in reduce/mod.test.ts to follow
Arrange/Act/Assert: for tests calling reduce or the returned operatorFn
(symbols: reduce, operatorFn) create an explicit Arrange section that sets up
inputs and any stubs, an Act section that performs the call (e.g., capture the
function that will throw), and an Assert section that calls assertThrows with
the prepared act function and expected error/type/message; do this for the
zero-arg, one-arg, non-function reducer, missing initial value, and
non-Observable source tests so each test body clearly separates setup, action,
and assertion.
In `@scan/mod.test.ts`:
- Around line 13-58: Refactor each failing validation test to follow
Arrange/Act/Assert: for each Deno.test, first ARRANGE any inputs/mocks (e.g.,
prepare reducer or operatorFn via scan), then ACT by invoking the function under
test inside a lambda passed to assertThrows, and finally ASSERT by checking the
thrown TypeError and message; specifically update tests referencing scan,
operatorFn, and assertThrows so they explicitly separate setup (creating
operatorFn or args), execution (the () => scan(...) or () => operatorFn(...)
call) and the assertion (assertThrows(..., TypeError, "...")) into distinct
Arrange/Act/Assert sections.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 862af53e-a150-48e8-9ec4-1a07655495b2
📒 Files selected for processing (20)
empty/mod.test.tsfinalize/mod.test.tsfrom/mod.test.tsinterval/mod.test.tslast-value-from/mod.test.tspairwise/deno.jsonpairwise/mod.tsreduce/deno.jsonreduce/mod.test.tsreduce/mod.tsscan/deno.jsonscan/mod.test.tsscan/mod.tsshare/deno.jsonshare/mod.test.tsshare/mod.tsswitch-map/README.mdswitch-map/deno.jsonswitch-map/mod.tstap/mod.test.ts
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores