@@ -45,10 +45,10 @@ To run in explicit React versions (the number is the version, so `test:16.3` wil
4545REACT=16.4 npm run test:ci
4646```
4747
48- To run tests in all supported React versions, ` 0.14 ` , ` 15 ` , ` 16.2 ` , ` 16.3 ` , ` 16.4 ` ,
48+ To run tests in all supported React versions, ` 0.14 ` , ` 15 ` , ` 16.2 ` , ` 16.3 ` , ` 16.4 ` , 16.5`,
4949```
5050REACT=all npm run test:ci
51- ```
51+ ```
5252
5353To continuously watch and run tests, run the following:
5454```
7171 XX/
7272 package.json
7373 test/
74- getTestDeps.js
7574```
7675
7776So, for example, to test against React 15.4:
@@ -83,51 +82,22 @@ test/
8382 15.4/
8483 package.json
8584 test/
86- getTestDeps.js
8785```
8886
89- The package.json must include the correct versions of ` react ` , ` react-dom ` ,
90- ` react-test-renderer ` and the correct enzyme adapter for the React version
91- being used, as well as the needed ` create-react-class ` , ` jest ` , ` enzyme ` versions
92- and the ` jest ` and ` scripts ` sections copied verbatim like this:
87+ The package.json must include the correct versions of ` react ` & ` react-dom `
88+ as well as the needed ` create-react-class ` like this:
9389
9490``` json
9591{
9692 "private" : true ,
9793 "devDependencies" : {
9894 "create-react-class" : " ^15.6.3" ,
99- "enzyme" : " ^3.3.0" ,
100- "enzyme-adapter-react-15.4" : " ^1.0.6" ,
101- "jest" : " ^23.4.2" ,
10295 "react" : " 15.4" ,
103- "react-dom" : " 15.4" ,
104- "react-test-renderer" : " 15.4"
105- },
106- "jest" : {
107- "testURL" : " http://localhost" ,
108- "collectCoverage" : true ,
109- "coverageDirectory" : " ./coverage"
110- },
111- "scripts" : {
112- "test" : " jest"
96+ "react-dom" : " 15.4"
11397 }
11498}
11599```
116100
117- ` getTestDeps.js ` should load the version-specific enzyme adapter and
118- test renderer (all versions newer than 0.14 use ` react-test-renderer ` ,
119- 0.14 uses ` react-addons-test-utils ` ):
120-
121- ``` js
122- import enzyme from ' enzyme'
123- import TestRenderer from ' react-test-renderer'
124- import Adapter from ' enzyme-adapter-react-15.4'
125-
126- enzyme .configure ({ adapter: new Adapter () })
127-
128- export { TestRenderer , enzyme }
129- ```
130-
131101Then you can run tests against this version with:
132102
133103```
156126 - REACT=16.2
157127 - REACT=16.3
158128 - REACT=16.4
129+ - REACT=16.5
159130sudo : false
160131script :
161132 - npm run lint
0 commit comments