btholt / btholt/complete-intro-to-react
Doesnt work for React 16+
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/btholt/complete-intro-to-react/blob/03296d511993ad5399c09b032d2088583ab13102/package.json#L16
If you are going to use React 16,
Replace `jest-serializer-enzyme` to `enzyme-to-json/serializer` and include `enzyme-to-json` as a dev dependency.
For enzyme to work with React 16, you need to `yarn add enzyme-adapter-react-16 -D`
And then, inside your tests,
```
import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
beforeAll(() => {
configure({
adapter: new Adapter()
});
});
// your tests here..
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.