Prettify the frontend code (#8648)

* Add Prettier global configs

* Format js/jsx/ts/tsx/less files
This commit is contained in:
Erik Ritter
2019-11-27 14:02:48 -08:00
committed by GitHub
parent e21f768a92
commit 44d919c757
398 changed files with 8700 additions and 6117 deletions

View File

@@ -31,14 +31,10 @@ describe('TableElement', () => {
timeout: 0,
};
it('renders', () => {
expect(
React.isValidElement(<TableElement />),
).toBe(true);
expect(React.isValidElement(<TableElement />)).toBe(true);
});
it('renders with props', () => {
expect(
React.isValidElement(<TableElement {...mockedProps} />),
).toBe(true);
expect(React.isValidElement(<TableElement {...mockedProps} />)).toBe(true);
});
it('has 2 Link elements', () => {
const wrapper = shallow(<TableElement {...mockedProps} />);
@@ -54,10 +50,20 @@ describe('TableElement', () => {
it('sorts columns', () => {
const wrapper = shallow(<TableElement {...mockedProps} />);
expect(wrapper.state().sortColumns).toBe(false);
expect(wrapper.find(ColumnElement).first().props().column.name).toBe('id');
expect(
wrapper
.find(ColumnElement)
.first()
.props().column.name,
).toBe('id');
wrapper.find('.sort-cols').simulate('click');
expect(wrapper.state().sortColumns).toBe(true);
expect(wrapper.find(ColumnElement).first().props().column.name).toBe('active');
expect(
wrapper
.find(ColumnElement)
.first()
.props().column.name,
).toBe('active');
});
it('calls the collapseTable action', () => {
const wrapper = mount(<TableElement {...mockedProps} />);