MCPcopy Create free account
hub / github.com/ngrx/platform / TestEntityEffects

Class TestEntityEffects

modules/data/spec/entity-data.module.spec.ts:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36>('EC MetaReducer');
37
38@Injectable()
39class TestEntityEffects {
40 test$: Observable<Action> = createEffect(() =>
41 this.actions.pipe(
42 // tap(action => console.log('test$ effect', action)),
43 ofEntityOp(persistOps),
44 map(this.testHook)
45 )
46 );
47
48 testHook(action: EntityAction) {
49 return {
50 type: 'test-action',
51 payload: action, // the incoming action
52 entityName: action.payload.entityName,
53 };
54 }
55
56 constructor(private actions: Actions<EntityAction>) {}
57}
58
59class Hero {
60 id!: number;

Callers

nothing calls this directly

Calls 2

createEffectFunction · 0.90
ofEntityOpFunction · 0.85

Tested by

no test coverage detected