All files / src/app/extensions/address-doctor/store address-doctor-store.module.ts

100% Statements 11/11
100% Branches 0/0
100% Functions 1/1
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 272x 2x 2x 2x     2x 2x   2x       2x               2x   5x      
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { ActionReducerMap, StoreModule } from '@ngrx/store';
import { pick } from 'lodash-es';
 
import { AddressDoctorState } from './address-doctor-store';
import { AddressDoctorEffects } from './address-doctor/address-doctor.effects';
import { addressDoctorReducer } from './address-doctor/address-doctor.reducer';
 
const addressDoctorReducers: ActionReducerMap<AddressDoctorState> = {
  addressDoctorConfig: addressDoctorReducer,
};
 
const addressDoctorEffects = [AddressDoctorEffects];
 
@NgModule({
  imports: [
    EffectsModule.forFeature(addressDoctorEffects),
    StoreModule.forFeature('addressDoctor', addressDoctorReducers),
  ],
})
export class AddressDoctorStoreModule {
  static forTesting(...reducers: (keyof ActionReducerMap<AddressDoctorState>)[]) {
    return StoreModule.forFeature('addressDoctor', pick(addressDoctorReducers, reducers));
  }
}