Answers for "ninstall enzyme"

0

enzyme npm install

npm i --save-dev enzyme enzyme-adapter-react-16
Posted by: Guest on June-11-2020
2

react enzyme

// 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
Posted by: Guest on September-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language