Created
October 2, 2018 01:30
-
-
Save alex-okrushko/663b1183e938167ba009ee21b8d8496c to your computer and use it in GitHub Desktop.
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
it("should handle a basic source that emits next then errors, count=3", () => { | |
testScheduler.run(({ expectObservable, cold, expectSubscriptions }) => { | |
const source = cold("--1-2-3-#"); | |
const subs = [ "^ ! ", | |
" ^ ! ", | |
" ^ !" | |
]; | |
const expected = "--1-2-3----1-2-3-----1-2-3-#"; | |
expectObservable( | |
source.pipe(retryBackoff({ initialInterval: 1, maxAttempts: 3 })) | |
).toBe(expected); | |
expectSubscriptions(source.subscriptions).toBe(subs); | |
}); | |
}); | |
// FAILS with | |
AssertionError: expected [ Array(3) ] to deeply equal [ Array(3) ] | |
+ expected - actual | |
[ | |
{ | |
"subscribedFrame": 0 | |
- "unsubscribedFrame": 8 | |
+ "unsubscribedFrame": 1 | |
} | |
{ | |
- "subscribedFrame": 9 | |
- "unsubscribedFrame": 17 | |
+ "subscribedFrame": 0 | |
+ "unsubscribedFrame": 1 | |
} | |
{ | |
- "subscribedFrame": 19 | |
- "unsubscribedFrame": 27 | |
+ "subscribedFrame": 0 | |
+ "unsubscribedFrame": 1 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment