File tree Expand file tree Collapse file tree 4 files changed +230
-8
lines changed Expand file tree Collapse file tree 4 files changed +230
-8
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,13 @@ sudo: false
2
2
language : node_js
3
3
node_js :
4
4
- " 12.19"
5
+ env :
6
+ - REACT_DIST=16
7
+ - REACT_DIST=17
5
8
cache : yarn
6
9
install :
7
10
- yarn
11
+ - yarn add react@$REACT_DIST react-dom@$REACT_DIST
8
12
- yarn --cwd www
9
13
script :
10
14
- yarn test
Original file line number Diff line number Diff line change 65
65
"devDependencies" : {
66
66
"@babel/cli" : " ^7.8.4" ,
67
67
"@babel/core" : " ^7.9.0" ,
68
+ "@eps1lon/enzyme-adapter-react-17" : " ^0.1.0" ,
68
69
"@restart/hooks" : " ^0.3.22" ,
69
70
"@semantic-release/changelog" : " ^5.0.1" ,
70
71
"@semantic-release/git" : " ^9.0.0" ,
91
92
"eslint-plugin-react-hooks" : " ^3.0.0" ,
92
93
"jest" : " ^25.3.0" ,
93
94
"prettier" : " ^2.0.4" ,
94
- "react" : " ^16.13 .1" ,
95
- "react-dom" : " ^16.13 .1" ,
95
+ "react" : " ^17.0 .1" ,
96
+ "react-dom" : " ^17.0 .1" ,
96
97
"release-script" : " ^1.0.2" ,
97
98
"rimraf" : " ^3.0.2" ,
98
99
"rollup" : " ^2.6.1" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ global.requestAnimationFrame = function(callback) {
5
5
} ;
6
6
7
7
const Enzyme = require ( 'enzyme' ) ;
8
- const Adapter = require ( 'enzyme-adapter-react-16' ) ;
8
+ const Adapter16 = require ( 'enzyme-adapter-react-16' ) ;
9
+ const Adapter17 = require ( '@eps1lon/enzyme-adapter-react-17' ) ;
10
+
11
+ const Adapter = React . version . startsWith ( '16.' ) ? Adapter16 : Adapter17 ;
9
12
10
13
Enzyme . configure ( {
11
14
adapter : new Adapter ( ) ,
You can’t perform that action at this time.
0 commit comments