how to mock ngrx selector in a component
In a component, we use a ngrx selector to retrieve different parts of the state. public isListLoading$ = this.store.select(fromStore.getLoading); public users$ = this.store.select(fromStore.getUsers); the fromStore.method is created using ngrx createSelector method. For example: export const getState = createFeatureSelector<UsersState>('users'); export const getLoading = createSelector( getState, (state: UsersState) => state.loading ); I use these observables in the template: <div class="loader" *ngIf="isLoading$ | async"></div> <ul class="userList"> <li class="userItem" *ngFor="let user of