Skip to content

Instantly share code, notes, and snippets.

@lotif
Last active June 17, 2017 02:06
Show Gist options
  • Save lotif/6c1a8443a6a8a8f2f60d2b310cfc9df1 to your computer and use it in GitHub Desktop.
Save lotif/6c1a8443a6a8a8f2f60d2b310cfc9df1 to your computer and use it in GitHub Desktop.
more tests
// To test if the action producer has dispatched the correct action
expect(dispatchSpy).toBeCalledWith({ type: 'DIV_HAS_BEEN_CLICKED' });
// To test if the actual data on the reducer has changed
expect(store.getState().myReducer.divText).toEqual('new text');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment