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 payload = {
userId,
cartId,
selectedModeId: selectedModeId,
};
const action = new CheckoutActions.SetDeliveryMode(payload);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_MODE,
payload,
meta: StateEntityLoaderActions.entityLoadMeta(
PROCESS_FEATURE,
SET_DELIVERY_MODE_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const payload = {
userId,
cartId,
address,
};
const action = new CheckoutActions.SetDeliveryAddress(payload);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_DELIVERY_ADDRESS,
payload,
meta: StateEntityLoaderActions.entityLoadMeta(
PROCESS_FEATURE,
SET_DELIVERY_ADDRESS_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const payload = {
userId,
cartId,
paymentDetails: paymentDetails,
};
const action = new CheckoutActions.SetPaymentDetails(payload);
expect({ ...action }).toEqual({
type: CheckoutActions.SET_PAYMENT_DETAILS,
payload,
meta: StateEntityLoaderActions.entityLoadMeta(
PROCESS_FEATURE,
SET_PAYMENT_DETAILS_PROCESS_ID
),
});
});
});
it('should create the action', () => {
const payload = {
userId,
cartId,
};
const action = new CheckoutActions.LoadSupportedDeliveryModes(payload);
expect({ ...action }).toEqual({
type: CheckoutActions.LOAD_SUPPORTED_DELIVERY_MODES,
payload,
meta: StateEntityLoaderActions.entityLoadMeta(
PROCESS_FEATURE,
SET_SUPPORTED_DELIVERY_MODE_PROCESS_ID
),
});
});
});