Created
May 22, 2017 05:34
-
-
Save visualskyrim/3aa47ee3e667ca332d3bfb81596922a4 to your computer and use it in GitHub Desktop.
Use Enzyme to test React/Redux container - Code List 2
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 { shallow } from 'enzyme'; | |
const shallowWithStore = (component, store) => { | |
const context = { | |
store, | |
}; | |
return shallow(component, { context }); | |
}; | |
export default shallowWithStore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment