From 8cebf8e837f5bc2917d5f693c6b9a2f6a0cfa3d6 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Sat, 30 Jul 2022 23:42:52 -0500 Subject: [PATCH] redux test updates --- squarenotsquare/__tests__/Redux-test.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/squarenotsquare/__tests__/Redux-test.js b/squarenotsquare/__tests__/Redux-test.js index 355ce66..6a4d7d5 100644 --- a/squarenotsquare/__tests__/Redux-test.js +++ b/squarenotsquare/__tests__/Redux-test.js @@ -1,6 +1,24 @@ 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', () => { const configgedStore = configStore; 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); }) \ No newline at end of file