Last active
June 10, 2017 18:24
-
-
Save DaveMBush/05066ff3181cfd98fbbb966ac431ecc6 to your computer and use it in GitHub Desktop.
RxJS Marble Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const testScheduler = new TestScheduler(); | |
const hotObservable = testScheduler.createHotObservable(hotMarbleString); | |
const coldObservable = testScheduler.createColdObservable(coldMarbleString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testScheduler.createHotObservable('-a|',{a: {firstName: 'Dave', lastName: 'Bush'}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'a|' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testScheduler = new TestScheduler(null); | |
spyOn(Observable, 'timer').and.returnValue(testScheduler.createHotObservable('---a|')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment