Questions tagged [marble-diagram]

5 questions
9
votes
1 answer

How to read the RxJs mergeMap marble diagram

In this marble diagram for mergeMap, how do you read this expression? // Kind of, looks like an em-dash near the end mergeMap(i => 10*i--10*i--10*i--|)
Ed I
  • 7,008
  • 3
  • 41
  • 50
5
votes
1 answer

Karma / jasmine-marbles: test failure message not properly formatted

I have added jasmine-marbles to my project and I am getting error messages like this: Expected $[0].frame = 20 to equal 70. Expected $[0].notification.kind = 'E' to equal 'N'. Expected $[0].notification.value = undefined to equal…
Felix
  • 3,999
  • 3
  • 42
  • 66
2
votes
0 answers

Combine RxJS marble diagrams

I'm testing an observable that might be described with following diagram: -a(bcdef) // emit one value at first frame and 5 values in second frame --g // emit one value at third frame But I cannot describe this observable in single diagram,…
Valentine
  • 506
  • 6
  • 23
0
votes
1 answer

ngrx - marble testing and withLatestFrom

I'm using Angular 8 and ngrx 8. I'm trying to write unit tests for an effect that uses withLatestFrom to get some values from the state. I'm using rxjs/testing/TestScheduler for this. In there, I have a marble diagram like this: actions$ = hot('aa',…
kaveh
  • 2,046
  • 1
  • 21
  • 33
0
votes
2 answers

Should we avoid nested rxjs operators? One case which I cannot test

I have written the following effect in my Angular app which uses rxjs. On MyActions.myAction, I receive an object containing a property ids - an array of ids - and for each id I want to send an HTTP request via this.myApiService.getResource, which…