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

@@ -117,7 +117,9 @@ describe('chart actions', () => {
it('should CHART_UPDATE_TIMEOUT action upon query timeout', () => {
const unresolvingPromise = new Promise(() => {});
fetchMock.post(MOCK_URL, () => unresolvingPromise, { overwriteRoutes: true });
fetchMock.post(MOCK_URL, () => unresolvingPromise, {
overwriteRoutes: true,
});
const timeoutInSec = 1 / 1000;
const actionThunk = actions.postChartFormData({}, false, timeoutInSec);
@@ -133,7 +135,11 @@ describe('chart actions', () => {
});
it('should dispatch CHART_UPDATE_FAILED action upon non-timeout non-abort failure', () => {
fetchMock.post(MOCK_URL, { throws: { statusText: 'misc error' } }, { overwriteRoutes: true });
fetchMock.post(
MOCK_URL,
{ throws: { statusText: 'misc error' } },
{ overwriteRoutes: true },
);
const timeoutInSec = 1 / 1000;
const actionThunk = actions.postChartFormData({}, false, timeoutInSec);

View File

@@ -19,7 +19,6 @@
import chartReducer, { chart } from '../../../src/chart/chartReducer';
import * as actions from '../../../src/chart/chartAction';
describe('chart reducers', () => {
const chartKey = 1;
let testChart;
@@ -39,7 +38,10 @@ describe('chart reducers', () => {
});
it('should update endtime on timeout', () => {
const newState = chartReducer(charts, actions.chartUpdateTimeout('timeout', 60, chartKey));
const newState = chartReducer(
charts,
actions.chartUpdateTimeout('timeout', 60, chartKey),
);
expect(newState[chartKey].chartUpdateEndTime).toBeGreaterThan(0);
expect(newState[chartKey].chartStatus).toEqual('failed');
});