You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
551 B

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);
})
});