Browse Source

redux test updates

pull/1/head
Tim Glasgow 2 years ago
parent
commit
8cebf8e837
  1. 18
      squarenotsquare/__tests__/Redux-test.js

18
squarenotsquare/__tests__/Redux-test.js

@ -1,6 +1,24 @@
import configStore from '../src/redux/CreateStore'; 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';
test('configures redux store', () => { test('configures redux store', () => {
const configgedStore = configStore; const configgedStore = configStore;
expect(configgedStore).toEqual(expect.anything()); expect(configgedStore).toEqual(expect.anything());
}) })
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);
})
Loading…
Cancel
Save