Breaking changes
- Renamed
toMatchActionCreators
->toMatchActionSnapshot
toHandleActions
andtoMatchActionSnapshot
expects action creators that does not have arguments:
const actions = {
increment: () => ({ type: "INC" })
};
If you have actions that receives arguments you can wrap them into function
const add = (number) => ({ type: "ADD", payload: number });
const actions = {
add: () => add(1)
};
Features
- Now
toMatchActionSnapshot
shows expected and actual results when tests fails