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 action = new CheckoutActions.SetPaymentDetailsSuccess(
paymentDetails
);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_PAYMENT_DETAILS_SUCCESS,
payload: paymentDetails,
meta: StateEntityLoaderActions.entitySuccessMeta(
PROCESS_FEATURE,
SET_PAYMENT_DETAILS_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const action = new CheckoutActions.SetDeliveryAddressSuccess(address);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_ADDRESS_SUCCESS,
payload: address,
meta: StateEntityLoaderActions.entitySuccessMeta(
PROCESS_FEATURE,
SET_DELIVERY_ADDRESS_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const action = new CheckoutActions.SetDeliveryModeSuccess(
selectedModeId
);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_MODE_SUCCESS,
payload: selectedModeId,
meta: StateEntityLoaderActions.entitySuccessMeta(
PROCESS_FEATURE,
SET_DELIVERY_MODE_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const action = new CheckoutActions.LoadSupportedDeliveryModesSuccess(
modes
);
expect({ ...action }).toEqual({
type: CheckoutActions.LOAD_SUPPORTED_DELIVERY_MODES_SUCCESS,
payload: modes,
meta: StateEntityLoaderActions.entitySuccessMeta(
PROCESS_FEATURE,
SET_SUPPORTED_DELIVERY_MODE_PROCESS_ID
),
});
});
});