Skip to content

Commit

Permalink
fix: allow 0 as a value for input field
Browse files Browse the repository at this point in the history
  • Loading branch information
flaminic committed Dec 4, 2024
1 parent b7c2e72 commit 963586a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ describe('<Input>', () => {

expect(onKeyDown).toHaveBeenCalledTimes(1)
})

it('should render a field with value zero', () => {
const screen = render(
<InputField label="label" name="foo" type="number" value={0} />
)

expect(screen.getByLabelText('label')).toHaveValue(0)
})
})

0 comments on commit 963586a

Please sign in to comment.