Create-react-app: Expose Jest Setup Files

Created on 23 Oct 2017  路  2Comments  路  Source: facebook/create-react-app

With Enzyme 3x come adapter packages. Its a bit tedious to insert into every test file

import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-15";

configure({ adapter: new Adapter() });

when you can create just a single setup file to serve all the tests.

Most helpful comment

All 2 comments

I can't believe I missed that! Thanks

Was this page helpful?
0 / 5 - 0 ratings