Created
August 14, 2018 20:11
-
-
Save DanielRamosAcosta/9f9a8831c3d5c3331424962c5ae61c2a to your computer and use it in GitHub Desktop.
RxJS test with marble iagrams
This file contains hidden or 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('multiplies each number by 2', () => { | |
| createScheduler().run(({ cold, expectObservable }) => { | |
| const values = { a: 1, b: 2, c: 3, x: 2, y: 4, z: 6 } | |
| const numbers$ = cold('a-b-c-|', values) as Observable<number> | |
| const resultDiagram = 'x-y-z-|' | |
| expectObservable(numTwoTimes(numbers$)).toBe(resultDiagram, values) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment