Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
});
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);
});
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);
});
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);
});
});
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);
});
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);
});
});
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
CoreModule.forRoot()
],
providers: [
UiEffects,
StorageService,
AmaTitleService,
provideMockActions(() => actions$)
]
});
effects = TestBed.get(UiEffects);
metadata = getEffectsMetadata(effects);
storageService = TestBed.get(StorageService);
});
{
provide: BpmnFactoryToken,
useValue: {}
},
{
provide: ProcessModelerServiceToken,
useValue: {
updateElementProperty: jest.fn(),
getRootProcessElement: jest.fn().mockReturnValue({ id: '' })
}
}
]
});
effects = TestBed.get(ProcessVariablesEffects);
metadata = getEffectsMetadata(effects);
});
{
provide: BpmnFactoryToken,
useValue: {}
},
{
provide: ProcessModelerServiceToken,
useValue: {
updateElementProperty: jest.fn(),
getRootProcessElement: jest.fn().mockReturnValue({ id: '' })
}
}
]
});
effects = TestBed.get(ProcessMessagesEffects);
metadata = getEffectsMetadata(effects);
});
}
return of({});
}),
dispatch: jest.fn()
}
},
{
provide: DialogService,
useValue: { openDialog: jest.fn() }
}
]
});
effects = TestBed.get(ProjectsEffects);
metadata = getEffectsMetadata(effects);
dashboardService = TestBed.get(DashboardService);
});