The small pack of enzyme snippets
Snippets
Snippet |
Renders |
imea16 |
Import enzyme and adapter v16 |
imea16.1 |
Import enzyme and adapter v16.1 |
imea16.2 |
Import enzyme and adapter v16.2 |
imea16.3 |
Import enzyme and adapter v16.3 |
shal |
shallow component |
moun |
mount component |
rend |
render component |
fin |
find in component |
Full Expansions
imea16 - Import enzyme and adapter v16
import Enzyme, { shallow, mount, render } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
imea16.1 - Import enzyme and adapter v16.1
import Enzyme, { shallow, mount, render } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16.1';
Enzyme.configure({ adapter: new Adapter() });
imea16.1 - Import enzyme and adapter v16.2
import Enzyme, { shallow, mount, render } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16.2';
Enzyme.configure({ adapter: new Adapter() });
imea16.1 - Import enzyme and adapter v16.3
import Enzyme, { shallow, mount, render } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16.3';
Enzyme.configure({ adapter: new Adapter() });
shal - shallow component
const wrapper = shallow(<Component />);
moun - mount component
const wrapper = mount(<Component />);
rend - render component
const wrapper = render(<Component />);
fin - find in component
wrapper.find(<Component/);