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

@@ -35,14 +35,10 @@ describe('SavedQuery', () => {
animation: false,
};
it('is valid', () => {
expect(
React.isValidElement(<SaveQuery />),
).toBe(true);
expect(React.isValidElement(<SaveQuery />)).toBe(true);
});
it('is valid with props', () => {
expect(
React.isValidElement(<SaveQuery {...mockedProps} />),
).toBe(true);
expect(React.isValidElement(<SaveQuery {...mockedProps} />)).toBe(true);
});
it('has a ModalTrigger', () => {
const wrapper = shallow(<SaveQuery {...mockedProps} />);
@@ -63,7 +59,10 @@ describe('SavedQuery', () => {
const wrapper = shallow(<SaveQuery {...mockedProps} onSave={saveSpy} />);
const modal = shallow(wrapper.instance().renderModalBody());
expect(modal.find(Button)).toHaveLength(2);
modal.find(Button).at(0).simulate('click');
modal
.find(Button)
.at(0)
.simulate('click');
expect(saveSpy.calledOnce).toBe(true);
});
it('has an update button if this is an existing query', () => {
@@ -78,7 +77,10 @@ describe('SavedQuery', () => {
const wrapper = shallow(<SaveQuery {...props} onUpdate={updateSpy} />);
const modal = shallow(wrapper.instance().renderModalBody());
expect(modal.find(Button)).toHaveLength(3);
modal.find(Button).at(0).simulate('click');
modal
.find(Button)
.at(0)
.simulate('click');
expect(updateSpy.calledOnce).toBe(true);
});
});