Skip to content

Commit c3c6e6e

Browse files
committed
fix: assert tw.style was called instead of checking mock return value in BenefitCard test
1 parent 1356961 commit c3c6e6e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/components/UI/Rewards/components/Benefits/BenefitCard.test.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ describe('BenefitCard', () => {
110110
uri: 'https://cdn.example.com/benefit.png',
111111
});
112112
expect(image.props.resizeMode).toBe('cover');
113-
expect(image.props.style).toContain('w-full h-full rounded-lg');
113+
const { useTailwind } = jest.requireMock(
114+
'@metamask/design-system-twrnc-preset',
115+
);
116+
expect(useTailwind().style).toHaveBeenCalledWith(
117+
'w-full h-full rounded-lg',
118+
);
114119
});
115120

116121
it('uses a unique image testID per benefit id', () => {

0 commit comments

Comments
 (0)