Last active
January 11, 2018 16:48
-
-
Save slightlytyler/1e2735efa68dcc4d3b9024c04da62d4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as actions from './actions'; | |
const dispatch = spy(); | |
const getState = () => ({ | |
...your mocked state | |
}); | |
describe('Action A', () => { | |
it('should dispatch a correctly formatted action', () => { | |
actions.actionA('first arg', 'second arg')(dispatch, getState); | |
expect(dispatch).to.have.been.calledWith({ | |
...expected action shape | |
}); | |
dispatch.reset(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment