Last active
February 2, 2021 03:58
-
-
Save harry100/93067a0a7e26f649656ab5f42f0f6201 to your computer and use it in GitHub Desktop.
snippet to mock a HOC.
This file contains 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 React from 'react' | |
jest.mock('/path/to/@HOC', () => () => | |
// eslint-disable-next-line react/display-name | |
Component => (props) => <Component {...props} /> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment