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

@@ -70,7 +70,7 @@ describe('ChangeDatasourceModal', () => {
expect(wrapper.find(Modal)).toHaveLength(1);
});
it('fetches datasources', (done) => {
it('fetches datasources', done => {
inst.onEnterModal();
setTimeout(() => {
expect(fetchMock.calls(DATASOURCES_ENDPOINT)).toHaveLength(1);
@@ -79,12 +79,14 @@ describe('ChangeDatasourceModal', () => {
}, 0);
});
it('changes the datasource', (done) => {
it('changes the datasource', done => {
fetchMock.get(DATASOURCE_ENDPOINT, DATASOURCE_PAYLOAD);
inst.selectDatasource(datasourceData);
setTimeout(() => {
expect(fetchMock.calls(DATASOURCE_ENDPOINT)).toHaveLength(1);
expect(props.onDatasourceSave.getCall(0).args[0]).toEqual(DATASOURCE_PAYLOAD);
expect(props.onDatasourceSave.getCall(0).args[0]).toEqual(
DATASOURCE_PAYLOAD,
);
fetchMock.reset();
done();
}, 0);