Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fix tests/lints #1965

Benjamin King5ae6932647ef
diff --git a/web/js/modules/compare/actions.js b/web/js/modules/compare/actions.js
index 8a63c3841..523530755 100644
--- a/web/js/modules/compare/actions.js
+++ b/web/js/modules/compare/actions.js
@@ -1,5 +1,5 @@
import { initSecondLayerGroup } from '../layers/actions';
-import {initSecondDate} from '../date/actions';
+import { initSecondDate } from '../date/actions';
import {
CHANGE_STATE,
TOGGLE_ON_OFF,
@@ -18,20 +18,12 @@ export function toggleCompareOnOff() {
dispatch(initSecondLayerGroup());
dispatch(initSecondDate());
}
- dispatch({
- type: TOGGLE_ON_OFF
- });
+ dispatch({ type: TOGGLE_ON_OFF });
};
}
export function setValue(num) {
- return {
- type: CHANGE_VALUE,
- value: num
- };
+ return { type: CHANGE_VALUE, value: num };
}
export function changeMode(str) {
- return {
- type: CHANGE_MODE,
- mode: str
- };
+ return { type: CHANGE_MODE, mode: str };
}
diff --git a/web/js/modules/compare/actions.test.js b/web/js/modules/compare/actions.test.js
index b79d703cd..0fc1f79ef 100644
--- a/web/js/modules/compare/actions.test.js
+++ b/web/js/modules/compare/actions.test.js
@@ -9,6 +9,7 @@ import {
import thunk from 'redux-thunk';
import { INIT_SECOND_LAYER_GROUP } from '../layers/constants';
import fixtures from '../../fixtures';
+import { INIT_SECOND_DATE } from '../date/constants';
const middlewares = [thunk];
const state = fixtures.getState();
@@ -18,9 +19,11 @@ test('toggleCompareOnOff dispactches two actions', () => {
store.dispatch(toggleCompareOnOff());
const firstResponse = store.getActions()[0];
const secondResponse = store.getActions()[1];
+ const thirdResponse = store.getActions()[2];
expect(firstResponse.type).toEqual(INIT_SECOND_LAYER_GROUP);
- expect(secondResponse.type).toEqual(CONSTANTS.TOGGLE_ON_OFF);
+ expect(secondResponse.type).toEqual(INIT_SECOND_DATE);
+ expect(thirdResponse.type).toEqual(CONSTANTS.TOGGLE_ON_OFF);
});
test(
diff --git a/web/js/modules/date/actions.js b/web/js/modules/date/actions.js
index 3e07aef01..64a151224 100644
--- a/web/js/modules/date/actions.js
+++ b/web/js/modules/date/actions.js
@@ -22,8 +22,7 @@ export function updateAppNow(date) {
}
export function initSecondDate() {
return {
- type: INIT_SECOND_DATE,
-
+ type: INIT_SECOND_DATE
};
}
export function selectDate(value) {
diff --git a/web/js/modules/date/reducers.js b/web/js/modules/date/reducers.js
index 710d5c084..8d6b413f5 100644
--- a/web/js/modules/date/reducers.js
+++ b/web/js/modules/date/reducers.js
@@ -39,7 +39,7 @@ export function dateReducer(state = dateReducerState, action) {
});
case INIT_SECOND_DATE:
return lodashAssign({}, state, {
- selectedB: util.dateAdd(state.selected, 'day', -7),
+ selectedB: util.dateAdd(state.selected, 'day', -7)
});
case CHANGE_CUSTOM_INTERVAL:
return lodashAssign({}, state, {