does anybody have idea how to write unit tests for the below function? I spent a lot of time trying to find a solution, but without any result. The selectCurrentRoute is an ngrx router selector.
this.store
.pipe(select(selectCurrentRoute), takeUntil(this.destroy), pairwise())
.subscribe(([previousRoute, currentRoute]) => {
if (previousRoute?.routeConfig?.path === 'login') {
this.getSettings();
}
});
Thank you in advance!
Try something like this (This is Angular 5 and Ngrx 4):