August 2017
Beginner
374 pages
10h 41m
English
We start by writing tests for our synchronous action creators. Remember: action creators are functions which return action objects. To test them, we need to call the action creator and check if it returns the expected action object.
We are going to implement tests for the filter action creators, as they are the only synchronous ones in our application:
import { setFilter, clearFilter } from '../../src/actions'import { SET_FILTER, CLEAR_FILTER } from '../../src/actionTypes'
Read now
Unlock full access