Testing RxJs observables effectively
summary
Shows a concrete replacement for marble testing and demonstrates actual tools and code: using autospies to stub input observables, wiring fake values with next, and capturing outputs with observer spy (notably subscribe spy 2 and auto unsubscribe). Claims tests become flatter, avoid timing-frames, and stop asserting implementation details; shows refactoring marble tests into readable spec code, how multiple emissions are asserted, and that auto-unsubscribe prevents leaks.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 3:53The problem with marbles
- 7:52Testing structure & auto-spies
- 11:53Verifying observable outputs
- 19:39Using observer spy
- 24:03Summary & conclusion
related talks
19mModern Testing Strategies for Reactive Applications
44mJust Another Marble Monday – Unit Testing NGRX/RxJS w/Marbles
16mIntroduction to Marble Testing Rx (Web, iOS, Android)
27mUnderstanding High Order Observables
01h 45mRxJs from Scratch
41mTesting that the code does what the code does
28mWatch out: observers are here to stay
32mVenturing Into the world of RxSwift unit testing
