Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setup tests in create-react-app using Enzyme
import React from 'react';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import {createSerializer} from 'enzyme-to-json';
expect.addSnapshotSerializer(createSerializer({mode: 'deep'}));
// React 16 Enzyme adapter
Enzyme.configure({adapter: new Adapter()});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.