Skip to content

Commit 5f9ed80

Browse files
committed
Refactor data folder structure
1 parent 8f480ef commit 5f9ed80

File tree

21 files changed

+26
-16
lines changed

21 files changed

+26
-16
lines changed

__tests__/actions/actions.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { restart } from '../../src/actions/restart';
22
import { submitAnswer } from '../../src/actions/submitAnswer';
33
import { toggle, toggleJS, toggleMode } from '../../src/actions/toggle';
4-
import { SUBMIT, TOGGLE, TOGGLE_JS, TOGGLE_MODE, RESTART } from '../../src/data/constants';
4+
import {
5+
SUBMIT,
6+
TOGGLE,
7+
TOGGLE_JS,
8+
TOGGLE_MODE,
9+
RESTART
10+
} from '../../src/static/constants/actions';
511

612
describe('Action Creators', () => {
713
it('should dispatch RESTART action', () => {

__tests__/components/ButtonContainer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ButtonContainer, {
88
ButtonContainer as NotConnectedButtonContainer
99
} from '../../src/components/ButtonContainer';
1010
import { answers } from '../../src/store';
11-
import { SUBMIT } from '../../src/data/constants';
11+
import { SUBMIT } from '../../src/static/constants/actions';
1212

1313
describe('<ButtonContainer /> connected', () => {
1414
const mockStore = configureMockStore();

__tests__/components/Toggle.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { themeLight } from '../../src/styles/themes/theme.light';
88
import { themeDark } from '../../src/styles/themes/theme.dark';
99
import 'jest-styled-components';
1010
import Toggle from '../../src/components/Toggle';
11-
import { TOGGLE } from '../../src/data/constants';
11+
import { TOGGLE } from '../../src/static/constants/actions';
1212

1313
const mockClick = jest.fn();
1414
const mockStore = configureMockStore();

__tests__/middleware/submit.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import configureMockStore from 'redux-mock-store';
22
import { submitMiddleware } from '../../src/middleware/submit';
3-
import { SUBMIT } from '../../src/data/constants';
3+
import { SUBMIT } from '../../src/static/constants/actions';
44

55
const next = jest.fn();
66
const mockStore = configureMockStore();

__tests__/middleware/toggle.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import configureMockStore from 'redux-mock-store';
22
import { toggleMiddleware } from '../../src/middleware/toggle';
3-
import { TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../../src/data/constants';
3+
import { TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../../src/static/constants/actions';
44

55
const next = jest.fn();
66
const mockStore = configureMockStore();

__tests__/pages/Game.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { themeDark } from '../../src/styles/themes/theme.dark';
99
import styleLight from '../../src/styles/hljs/hljs.light';
1010
import styleDark from '../../src/styles/hljs/hljs.dark';
1111
import Game from '../../src/pages/Game';
12-
import { RESTART } from '../../src/data/constants';
12+
import { RESTART } from '../../src/static/constants/actions';
1313

1414
const patterns = [
1515
{

__tests__/reducers/reducers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import reducer from '../../src/reducers';
2-
import { SUBMIT, TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../../src/data/constants';
2+
import { SUBMIT, TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../../src/static/constants/actions';
33

44
const answers = [
55
{

src/actions/restart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RESTART } from '../data/constants';
1+
import { RESTART } from '../static/constants/actions';
22

33
export const restart = payload => ({
44
type: RESTART,

src/actions/submitAnswer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SUBMIT } from '../data/constants';
1+
import { SUBMIT } from '../static/constants/actions';
22

33
export const submitAnswer = payload => ({
44
type: SUBMIT,

src/actions/toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../data/constants';
1+
import { TOGGLE, TOGGLE_JS, TOGGLE_MODE } from '../static/constants/actions';
22

33
export const toggle = payload => ({
44
type: TOGGLE,

0 commit comments

Comments
 (0)