Created
March 14, 2018 15:38
-
-
Save ourmaninamsterdam/bfb2742bd42d8eb44f1aa6b8a561bac4 to your computer and use it in GitHub Desktop.
Testing inner component of HOC using Enzyme
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
const DummyComponent = () => <div>Dummy</div>; | |
const Component = getComposedComponent(DummyComponent); | |
const component = mount( | |
shallow(<Component foo={true} />).get(0) | |
); | |
eventMap.resize(); | |
expect(component.state().fooBar).toBe(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mount()
- as we are using lifecycle methods