fix warning in test case

This commit is contained in:
afc163 2018-12-27 11:46:22 +08:00
parent a74d04118b
commit b2c7c53b4c
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
5 changed files with 9 additions and 8 deletions

View File

@ -49,6 +49,7 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
PropTypes.string,
PropTypes.object as PropTypes.Requireable<HTMLElement>,
PropTypes.func,
PropTypes.bool,
]),
maskClosable: PropTypes.bool,
mask: PropTypes.bool,

View File

@ -11,7 +11,7 @@ import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
import Icon from '../icon';
import { tuple } from '../_util/type';
const ValidateStatuses = tuple('success', 'warning', 'error', 'validating');
const ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '');
export interface FormItemProps {
prefixCls?: string;

View File

@ -3,14 +3,14 @@
exports[`Input should support maxLength 1`] = `
<Input
disabled={false}
maxLength="3"
maxLength={3}
prefixCls="ant-input"
type="text"
>
<input
className="ant-input"
disabled={false}
maxLength="3"
maxLength={3}
onKeyDown={[Function]}
type="text"
/>
@ -110,12 +110,12 @@ exports[`TextArea should support disabled 1`] = `
exports[`TextArea should support maxLength 1`] = `
<TextArea
maxLength="10"
maxLength={10}
prefixCls="ant-input"
>
<textarea
className="ant-input"
maxLength="10"
maxLength={10}
onChange={[Function]}
onKeyDown={[Function]}
style={Object {}}

View File

@ -10,7 +10,7 @@ describe('Input', () => {
focusTest(Input);
it('should support maxLength', () => {
const wrapper = mount(<Input maxLength="3" />);
const wrapper = mount(<Input maxLength={3} />);
expect(wrapper).toMatchSnapshot();
});
@ -48,7 +48,7 @@ describe('TextArea', () => {
});
it('should support maxLength', () => {
const wrapper = mount(<TextArea maxLength="10" />);
const wrapper = mount(<TextArea maxLength={10} />);
expect(wrapper).toMatchSnapshot();
});
});

View File

@ -71,7 +71,7 @@ class NumericInput extends React.Component {
onChange={this.onChange}
onBlur={this.onBlur}
placeholder="Input a number"
maxLength="25"
maxLength={25}
/>
</Tooltip>
);