You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I test an observable with a switchMap containing a merge the Marble string passes but the expected completion frame is wrong. '(abcd)|'
Expected behavior
I expected the completion the be on frame 1 not 6 as frame 0 is a group of 4 emissions. '(abcd)|'
Reproduction code
IhavethefollowingobservablefromaNgRxeffectActionFactory$=createEffect(()=>this.actions$.pipe(ofType(Actions.loadInitialDataSuccess),switchMap(()=>merge(// a number of observables here the subscribe to web sockets each returning different actions)),catchError((error)=>of(Actions.Failure({ error })))));
When I test this
// for contextbeforeEach(()=>{TestBed.configureTestingModule({imports: [NxModule.forRoot(),MaterialModule],providers: [provideMockActions(()=>actions),provideMockStore(),],});jest.resetAllMocks();});
// the testit('should subscribe to messages and emit mapped actions',()=>{testScheduler.run(({ cold, expectObservable })=>{actions=cold('a|',{a: Actions.loadInitialDataSuccess({ data }),});expectObservable(effects.FmeActionFactory$).toBe('(abcd)|',{a: Actions.actionA({message: ma}),b: Actions.actionA({message: mb}),c: Actions.actionA({message: mc}),d: Actions.actionA({message: md})});});});
Describe the bug
When I test an observable with a
switchMap
containing amerge
the Marble string passes but the expected completion frame is wrong. '(abcd)|'Expected behavior
I expected the completion the be on frame 1 not 6 as frame 0 is a group of 4 emissions. '(abcd)|'
Reproduction code
When I test this
I get the following failure
Reproduction URL
No response
Version
7.4.0
Environment
Angualr 13, NgRx: 13
Additional context
No response
The text was updated successfully, but these errors were encountered: