Skip to content

Commit

Permalink
Fixed NumberInput's test to verify that the event object is properl…
Browse files Browse the repository at this point in the history
…y passed to the onBlur handler
  • Loading branch information
yanchesky committed Mar 18, 2024
1 parent df9ab51 commit 08b241b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/input/NumberInput.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ describe('<NumberInput />', () => {
);
const input = screen.getByLabelText('resources.posts.fields.views');
fireEvent.blur(input);
expect(onBlur).toHaveBeenCalled();
expect(onBlur).toHaveBeenCalledWith(
expect.objectContaining({ type: 'blur' })
);
});

it('should display error message onBlur if required', async () => {
Expand Down

0 comments on commit 08b241b

Please sign in to comment.