Skip to content

Commit

Permalink
feat: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce committed Jun 5, 2020
1 parent bab9cc6 commit f98eee9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/index.js
Expand Up @@ -739,6 +739,21 @@ describe('InputNumber', () => {
expect(inputElement.value).not.to.be('1e-7');
});

it('value can be changed when the input number is really big', () => {
const Demo = createReactClass({
render() {
return <InputNumber ref="inputNum" value={1e24} />;
},
});
example = ReactDOM.render(<Demo />, container);
inputNumber = example.refs.inputNum;
inputElement = ReactDOM.findDOMNode(inputNumber.input);
Simulate.mouseDown(
findRenderedDOMComponentWithClass(example, 'rc-input-number-handler-up'),
);
expect(inputElement.value).to.be('1e+24');
});

it('value can be changed when dynamic setting max', () => {
const Demo = createReactClass({
getInitialState() {
Expand Down

0 comments on commit f98eee9

Please sign in to comment.