Browse Source

system reducer type import

pull/8/head
Tim Glasgow 2 years ago
parent
commit
ef8e629ce3
  1. 6
      squarenotsquare/__tests__/Redux-test.js
  2. 2
      squarenotsquare/src/redux/reducers/SystemReducer.js

6
squarenotsquare/__tests__/Redux-test.js

@ -1,5 +1,4 @@
import configStore from '../src/redux/CreateStore';
import {navReducer} from '../src/redux/reducers/NavReducer';
import {systemReducer} from '../src/redux/reducers/SystemReducer';
import rootReducer from '../src/redux/reducers/RootReducer';
import { APP_INIT } from '../src/redux/types/SystemTypes';
@ -13,11 +12,6 @@ test('rootReducer constructs', () => {
expect(rootReducer).toEqual(expect.anything());
})
test('navReducer response to app-init', () => {
let nextState = navReducer({}, {type: APP_INIT});
expect(nextState).toEqual({});
})
test('systemReducer response to app-init', () => {
let nextState = systemReducer.system({}, {type: APP_INIT, system: {value: 0}});
expect(nextState.value).toEqual(0);

2
squarenotsquare/src/redux/reducers/SystemReducer.js

@ -1,4 +1,4 @@
import { APP_INIT } from "../types/UserTypes";
import { APP_INIT } from "../types/SystemTypes";
function sys(state = {}, action) {
switch (action.type) {

Loading…
Cancel
Save