enzyme
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
3.67
9
// global config react and enzyme
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import { shallow, mount, render } from 'enzyme'
import renderer from 'react-test-renderer'
configure({ adapter: new Adapter() })
global.shallow = shallow
global.mount = mount
global.render = render
global.renderer = renderer
Thank you!
9
0
4.43
7
hmmm tasty
Thank you!
7
0
4.5
10
npm i --save-dev enzyme enzyme-adapter-react-16
Thank you!
10
0
Are there any code examples left?
New code examples in category Other