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 create the action', () => {
const error = 'anError';
const action = new CheckoutActions.LoadSupportedDeliveryModesFail(
error
);
expect({ ...action }).toEqual({
type: CheckoutActions.LOAD_SUPPORTED_DELIVERY_MODES_FAIL,
payload: error,
meta: StateEntityLoaderActions.entityFailMeta(
PROCESS_FEATURE,
SET_SUPPORTED_DELIVERY_MODE_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const error = 'anError';
const action = new CheckoutActions.SetPaymentDetailsFail(error);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_PAYMENT_DETAILS_FAIL,
payload: error,
meta: StateEntityLoaderActions.entityFailMeta(
PROCESS_FEATURE,
SET_PAYMENT_DETAILS_PROCESS_ID,
error
),
});
});
});
it('should create the action', () => {
const error = 'anError';
const action = new CheckoutActions.SetDeliveryModeFail(error);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_MODE_FAIL,
payload: error,
meta: StateEntityLoaderActions.entityFailMeta(
PROCESS_FEATURE,
SET_DELIVERY_MODE_PROCESS_ID,
error
),
});
});
});
it('should create the action', () => {
const error = 'anError';
const action = new CheckoutActions.SetDeliveryAddressFail(error);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_ADDRESS_FAIL,
payload: error,
meta: StateEntityLoaderActions.entityFailMeta(
PROCESS_FEATURE,
SET_DELIVERY_ADDRESS_PROCESS_ID,
error
),
});
});
});