mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Prettify the frontend code (#8648)
* Add Prettier global configs * Format js/jsx/ts/tsx/less files
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user