import * as actions from './peta.actions'; import { initialState } from '@core/modules/peta/reducers/peta.reducer'; import { PETAInterface } from '@core/modules/peta/models/peta.interface'; export const ui = null; export const accessibility = null; describe('Cart', () => { describe('Personalized ETA action', () => { let defaultState: PETAInterface; beforeEach(() => { defaultState = initialState; }); it('should have `LoadPETAAction` action', () => { const sapClient = '500'; const sapLang = 'EN'; const requestPayload = {}; const action = new actions.LoadPETAAction(sapClient, sapLang, requestPayload); expect({ ...action }).toEqual({ sapClient: sapClient, sapLang: sapLang, requestPayload: requestPayload, type: actions.LOAD_PETA_ACTION }); expect(action.type).toEqual(actions.LOAD_PETA_ACTION); }); it('should have `LoadPETASuccessAction` action', () => { const action = new actions.LoadPETASuccessAction(defaultState); expect({ ...action }).toEqual({ payload: defaultState, type: actions.LOAD_PETA_SUCCESS_ACTION }); expect(action.type).toEqual(actions.LOAD_PETA_SUCCESS_ACTION); }); }); });