Testing Action Creators
Learn how to test the actions in the Redux lifecycle.
We'll cover the following...
We have tried to keep asynchronous flows out of action creators throughout this course by moving them into middleware and utility functions. This approach allows for easy testing of action creators, as they are functions that return plain JavaScript objects:
import * as actions from 'constants/actionTypes';
export const setRecipes = recipes => ({
type: actions.SET_RECIPES,
payload: recipes
});
Our ...