💄 prettier codes

This commit is contained in:
afc163 2019-03-06 13:45:40 +08:00
parent f882c13e80
commit 881dce9a3e
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
4 changed files with 26 additions and 14 deletions

View File

@ -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();
});

View File

@ -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);
}

View File

@ -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(),
);
});
});

View File

@ -5,4 +5,4 @@ export function validProgress(progress: number | undefined) {
return 100;
}
return progress;
};
}