Previously I could test the below store select
this.store.select(fromRoot.someselector).pipe(map(r => this.store.dispatch(new Action())));
This was in my test
{provide: Store, useValue: jasmine.createSpyObj('store', ['select']);
store.select.and.returnValue(of({}));
But now it has changed to pipes
this.store.pipe(select(fromRoot.someselector));
this.store.pipe(
select(fromRoot.someselector),
filter(result => !!result),
map(r => {
if (result === ' hello') {
this.store.dispatch(new Action());
}
}
));
How to test this especially when you have map after select and within it you are dispatching an action and you want verify action was called.