@@ -29,16 +29,16 @@ enzyme now has an "Adapter" system. This means that you now need to install enzy
2929another module that provides the Adapter that tells enzyme how to work with your version of React
3030(or whatever other React-like library you are using).
3131
32- At the time of writing this, enzyme publishes "officially supported" adapters for React 0.13.x,
33- 0.14.x, 15.x, and 16.x. These adapters are npm packages of the form ` enzyme-adapter-react-{{version}} ` .
32+ At the time of writing this, enzyme publishes "officially supported" adapters for React 0.13.x, 0.14.x, 15.x, 16.x, and 17.x.
33+ These adapters are npm packages of the form ` enzyme-adapter-react-{{version}} ` .
3434
3535You will want to configure enzyme with the adapter you'd like to use before using enzyme in your
3636tests. The way to do this is with ` enzyme.configure(...) ` . For example, if your project depends
37- on React 16 , you would want to configure enzyme this way:
37+ on React 17 , you would want to configure enzyme this way:
3838
3939``` js
4040import Enzyme from ' enzyme' ;
41- import Adapter from ' enzyme-adapter-react-16 ' ;
41+ import Adapter from ' enzyme-adapter-react-17 ' ;
4242
4343Enzyme .configure ({ adapter: new Adapter () });
4444```
@@ -47,6 +47,7 @@ The list of adapter npm packages for React semver ranges are as follows:
4747
4848| enzyme Adapter Package | React semver compatibility |
4949| --- | --- |
50+ | ` enzyme-adapter-react-17 ` | ` ^17.0.0 ` |
5051| ` enzyme-adapter-react-16 ` | ` ^16.4.0-0 ` |
5152| ` enzyme-adapter-react-16.3 ` | ` ~16.3.0-0 ` |
5253| ` enzyme-adapter-react-16.2 ` | ` ~16.2 ` |
0 commit comments