Skip to content

Commit

Permalink
Test size prop
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonlenz committed Apr 19, 2022
1 parent 82e7941 commit dffb9a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/Footer/Logo/Logo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ describe('Logo component', () => {
const { getByText } = render(<Logo image={logoImage} heading={heading} />)
expect(getByText('Swoosh Branding')).toBeInTheDocument()
})

it.each([
['big', '.mobile-lg\\:grid-col-6'],
['medium', '.mobile-lg\\:grid-col-6'],
['slim', '.grid-gap-2'],
])('renders with size prop %s', (sizeString, expectedClass) => {
const size = sizeString as 'big' | 'medium' | 'slim'
const { container } = render(<Logo image={logoImage} size={size} />)
expect(container.querySelector(expectedClass)).toBeInTheDocument()
})
})

0 comments on commit dffb9a5

Please sign in to comment.