Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davejcameron committed Aug 3, 2023
1 parent 6348d8d commit 617a261
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/components/CombinationCard/tests/CombinationCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,28 @@ describe('<CombinationCard />', () => {
});

it.each`
discountClass | expectedChoiceOptions
${DiscountClass.Product} | ${[mockProductOption, mockOrderOption, mockShippingOption]}
${DiscountClass.Order} | ${[mockProductOption, mockOrderOption, mockShippingOption]}
${DiscountClass.Shipping} | ${[mockProductOption, mockOrderOption]}
`(
'renders choices for $discountClass discount',
({discountClass, expectedChoiceOptions}) => {
const combinationCard = mountWithApp(
<CombinationCard {...mockProps} discountClass={discountClass} />,
);
discountClass | expectedChoiceOptions
${DiscountClass.Product} | ${[mockProductOption, mockOrderOption, mockShippingOption]}
${DiscountClass.Order} | ${[mockProductOption, mockOrderOption, mockShippingOption]}
${DiscountClass.Shipping} | ${[mockProductOption, mockOrderOption]}
`(
'renders choices for $discountClass discount',
({discountClass, expectedChoiceOptions}) => {
const combinationCard = mountWithApp(
<CombinationCard {...mockProps} discountClass={discountClass} />,
);

expect(combinationCard).toContainReactComponent(ChoiceList, {
choices: expectedChoiceOptions.map(
(choice: {label: string; value: DiscountClass}) => ({
value: choice.value,
label: choice.label,
renderChildren: expect.any(Function),
}),
),
});
},
);
expect(combinationCard).toContainReactComponent(ChoiceList, {
choices: expectedChoiceOptions.map(
(choice: {label: string; value: DiscountClass}) => ({
value: choice.value,
label: choice.label,
renderChildren: expect.any(Function),
}),
),
});
},
);

it('renders a default label when the discountDescriptor has a blank value', () => {
const combinationCard = mountWithApp(
Expand Down

0 comments on commit 617a261

Please sign in to comment.