JSFiddle - React, Tailwind, and code Playground
by Alagar Kamuthurai
JavaScript
describe('setupNewMfaOption$', () => {
it('should navigate to the correct URL', () => {
const action = authActions.SetupNewMfaOpt();
actions$ = of(action);
effects.setupNewMfaOption$.subscribe(() => {
expect(router.navigateByUrl).toHaveBeenCalledWith(
ROUTE_DIR.Setup + MODIFY_ROUTES.SelectMfaMethodToAdd
);
});
});
it('should not dispatch any actions', () => {
const action = authActions.SetupNewMfaOpt();
actions$ = of(action);
effects.setupNewMfaOption$.subscribe(() => {
expect().nothing();
});
});
});