mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
💄 prettier codes
This commit is contained in:
parent
f882c13e80
commit
881dce9a3e
@ -7,7 +7,7 @@ describe('Collapse', () => {
|
||||
const wrapper = mount(
|
||||
<Collapse expandIcon={() => null}>
|
||||
<Collapse.Panel header="header" />
|
||||
</Collapse>
|
||||
</Collapse>,
|
||||
);
|
||||
expect(wrapper.render()).toMatchSnapshot();
|
||||
});
|
||||
@ -17,7 +17,7 @@ describe('Collapse', () => {
|
||||
<Collapse>
|
||||
<Collapse.Panel header="header" extra={<button type="button">action</button>} />
|
||||
<Collapse.Panel header="header" extra={<button type="button">action</button>} />
|
||||
</Collapse>
|
||||
</Collapse>,
|
||||
);
|
||||
expect(wrapper.render()).toMatchSnapshot();
|
||||
});
|
||||
|
@ -1,11 +1,14 @@
|
||||
import * as moment from 'moment';
|
||||
|
||||
export function formatDate(value: moment.Moment | undefined | null, format: string | string[]): string {
|
||||
if (!value) {
|
||||
return '';
|
||||
}
|
||||
if (Array.isArray(format)) {
|
||||
format = format[0];
|
||||
}
|
||||
return value.format(format);
|
||||
export function formatDate(
|
||||
value: moment.Moment | undefined | null,
|
||||
format: string | string[],
|
||||
): string {
|
||||
if (!value) {
|
||||
return '';
|
||||
}
|
||||
if (Array.isArray(format)) {
|
||||
format = format[0];
|
||||
}
|
||||
return value.format(format);
|
||||
}
|
||||
|
@ -205,7 +205,10 @@ describe('Input.Password', () => {
|
||||
it('should keep focus state', () => {
|
||||
const wrapper = mount(<Input.Password defaultValue="111" autoFocus />);
|
||||
expect(document.activeElement).toBe(
|
||||
wrapper.find('input').at(0).getDOMNode()
|
||||
wrapper
|
||||
.find('input')
|
||||
.at(0)
|
||||
.getDOMNode(),
|
||||
);
|
||||
wrapper
|
||||
.find('.ant-input-password-icon')
|
||||
@ -216,7 +219,10 @@ describe('Input.Password', () => {
|
||||
.at(0)
|
||||
.simulate('click');
|
||||
expect(document.activeElement).toBe(
|
||||
wrapper.find('input').at(0).getDOMNode()
|
||||
wrapper
|
||||
.find('input')
|
||||
.at(0)
|
||||
.getDOMNode(),
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -306,7 +312,10 @@ describe('Input allowClear', () => {
|
||||
.at(0)
|
||||
.simulate('click');
|
||||
expect(document.activeElement).toBe(
|
||||
wrapper.find('input').at(0).getDOMNode()
|
||||
wrapper
|
||||
.find('input')
|
||||
.at(0)
|
||||
.getDOMNode(),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -5,4 +5,4 @@ export function validProgress(progress: number | undefined) {
|
||||
return 100;
|
||||
}
|
||||
return progress;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user