Created
February 21, 2018 16:31
-
-
Save kojinkai/a30f0ac1a4740576468afb9214c1033c 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 React from 'react'; | |
import { shallow, mount } from 'enzyme'; | |
import { shallowWithIntl, mountWithIntl } from './react-intl'; | |
const componentWrapper = renderer => (Component, defaultProps) => props => renderer( | |
<Component | |
{...defaultProps} | |
{...props} | |
/>, | |
); | |
export const createWithShallow = componentWrapper(shallow); | |
export const createWithMount = componentWrapper(mount); | |
export const createWithShallowWithIntl = componentWrapper(shallowWithIntl); | |
export const createWithMountWithIntl = componentWrapper(mountWithIntl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment