import 'react-native'; import {appInit} from '../src/redux/actions/SystemActions'; import { APP_INIT } from '../src/redux/types/SystemTypes'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; const middlewares = [thunk]; const mockStore = configureMockStore(middlewares); test('sends action app-init', () => { const localStore = mockStore(); return localStore.dispatch(appInit()) .then( () => { const actualAction = localStore.getActions()[0]; expect(actualAction.type).toEqual(APP_INIT); }) });