Skip to content

test(rx-pipe-client): add unit tests - #293

Merged
Komoszek merged 1 commit into
mainfrom
test/rx-pipe-client
Jun 25, 2026
Merged

Komoszek merged 1 commit into
mainfrom
test/rx-pipe-client

Conversation

@claude

@claude claude Bot commented Jun 25, 2026

Copy link
Copy Markdown

Requested by Sebastian Konowrocki · Slack thread

Before / After

@leancodepl/rx-pipe-client previously had no tests. It now has 12 unit tests covering mkPipeClient and its createTopic factory: lazy factory creation (no premature pipe.topic call), correct forwarding of topic type and the exact topic-argument reference, observable passthrough, multi-notification streaming, live emission via a Subject, error propagation, unsubscription/teardown, per-invocation call counting, isolation between distinct topic types, empty-argument handling, and per-instance pipe binding.

How

A mocked Pipe (vi.fn for topic) returns RxJS observables (of / Subject / throwError / custom Observable) so the wrapper's currying and argument forwarding are asserted against real subscription behavior. rxjs is added as a devDependency since it is used only by the tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DXXPnGepYUGie3we1X9PTR


Generated by Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DXXPnGepYUGie3we1X9PTR
@claude
claude Bot marked this pull request as ready for review June 25, 2026 09:35
@Komoszek
Komoszek merged commit 9d6d797 into main Jun 25, 2026
1 check passed
@Komoszek
Komoszek deleted the test/rx-pipe-client branch June 25, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants