Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
debounce unittest account for 2 setProps call.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Dec 3, 2018
1 parent ba5bb1a commit 3699717
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/Input.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ describe('Input with type=number', () => {

input.find('input').simulate('keypress', {key: 'Enter'});

expect(mockSetProps.mock.calls.length).toEqual(1);
expect(mockSetProps.mock.calls[0][0].value).toEqual(
// setProps for n_submit and setProps for value if debounce.
expect(mockSetProps.mock.calls.length).toEqual(2);
expect(mockSetProps.mock.calls[1][0].value).toEqual(
Number(inputValues[inputValues.length - 1])
);
});
Expand Down

0 comments on commit 3699717

Please sign in to comment.