Skip to content

Commit

Permalink
added the mandatory onChange handler to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
devcer committed Feb 18, 2024
1 parent 2ac82fd commit de180be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/__tests__/switch.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Switch', () => {
})

it('forwards checked prop to input element', () => {
render(<Switch checked />)
render(<Switch checked onChange={() => {}} />)
const inputElement = screen.getByRole('switch')
expect(inputElement).toBeChecked()
})
Expand Down

0 comments on commit de180be

Please sign in to comment.