How to use the @ngrx/effects.getEffectsMetadata function in @ngrx/effects

To help you get started, we’ve selected a few @ngrx/effects examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / features / examples / crud / books.effects.spec.ts View on Github external
it('should not dispatch any actions', () => {
      const actions = new Actions(EMPTY);
      const effects = new BooksEffects(actions, store, localStorage);
      const metadata = getEffectsMetadata(effects);

      expect(metadata.persistBooks.dispatch).toEqual(false);
    });
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / features / examples / todos / todos.effects.spec.ts View on Github external
it('should not dispatch any action', () => {
      const actions$ = new Actions();
      const effect = new TodosEffects(actions$, store, localStorage);
      const metadata = getEffectsMetadata(effect);

      expect(metadata.persistTodos.dispatch).toEqual(false);
    });
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / core / auth / auth.effects.spec.ts View on Github external
it('should not dispatch any action', () => {
      const actions = new Actions(EMPTY);
      const effect = new AuthEffects(actions, localStorageService, router);
      const metadata = getEffectsMetadata(effect);

      expect(metadata.logout.dispatch).toEqual(false);
    });
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / features / examples / examples.effects.spec.ts View on Github external
it('should not dispatch action', () => {
      const actions = new Actions();
      const effect = new ExamplesEffects(
        actions,
        store,
        translateService,
        router,
        titleService
      );
      const metadata = getEffectsMetadata(effect);
      expect(metadata.setTranslateServiceLanguage.dispatch).toEqual(false);
    });
  });
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / features / examples / examples.effects.spec.ts View on Github external
it('should not dispatch action', () => {
      const actions = new Actions();
      const effect = new ExamplesEffects(
        actions,
        store,
        translateService,
        router,
        titleService
      );
      const metadata = getEffectsMetadata(effect);

      expect(metadata.setTitle.dispatch).toEqual(false);
    });
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / core / settings / settings.effects.spec.ts View on Github external
it('should not dispatch any action', () => {
      const actions = new Actions();
      const effect = new SettingsEffects(
        actions,
        store,
        router,
        overlayContainer,
        localStorageService,
        titleService,
        animationsService,
        translateService
      );
      const metadata = getEffectsMetadata(effect);

      expect(metadata.persistSettings.dispatch).toEqual(false);
    });
  });
github Activiti / activiti-modeling-app / src / app / store / effects / ui.effects.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [
                CoreModule.forRoot()
            ],
            providers: [
                UiEffects,
                StorageService,
                AmaTitleService,
                provideMockActions(() => actions$)
            ]
        });

        effects = TestBed.get(UiEffects);
        metadata = getEffectsMetadata(effects);

        storageService = TestBed.get(StorageService);
    });
github Activiti / activiti-modeling-app / src / app / process-editor / store / process-variables.effects.spec.ts View on Github external
{
                    provide:  BpmnFactoryToken,
                    useValue: {}
                },
                {
                    provide:  ProcessModelerServiceToken,
                    useValue: {
                        updateElementProperty: jest.fn(),
                        getRootProcessElement: jest.fn().mockReturnValue({ id: '' })
                    }
                }
            ]
        });

        effects = TestBed.get(ProcessVariablesEffects);
        metadata = getEffectsMetadata(effects);
    });
github Activiti / activiti-modeling-app / src / app / process-editor / store / process-messages.effects.spec.ts View on Github external
{
                    provide:  BpmnFactoryToken,
                    useValue: {}
                },
                {
                    provide:  ProcessModelerServiceToken,
                    useValue: {
                        updateElementProperty: jest.fn(),
                        getRootProcessElement: jest.fn().mockReturnValue({ id: '' })
                    }
                }
            ]
        });

        effects = TestBed.get(ProcessMessagesEffects);
        metadata = getEffectsMetadata(effects);
    });
github Activiti / activiti-modeling-app / src / app / dashboard / store / effects / projects.effects.spec.ts View on Github external
}

                            return of({});
                        }),
                        dispatch: jest.fn()
                    }
                },
                {
                    provide: DialogService,
                    useValue: { openDialog: jest.fn() }
                }
            ]
        });

        effects = TestBed.get(ProjectsEffects);
        metadata = getEffectsMetadata(effects);
        dashboardService = TestBed.get(DashboardService);
    });