-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Store
thaoln87 edited this page Jul 7, 2017
·
1 revision
- Integration test
- Test Store's state
const store = createStore(rootReducer, initialState);
const course = {title: 'Clean code'};
const action = courseActions.createCourseSuccess(course);
store.dispatch(action);
-
getState()
: get state from Store
const actual = store.getState().courses[0];
expect(actual).toEqual(course);