Skip to content

Commit d3b53e5

Browse files
Karlgor181
Karl
authored andcommitted
Added React 16 to peerDependencies and upgrade enzyme (#56)
1 parent e3368b2 commit d3b53e5

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@
2626
"babelify": "^7.3.0",
2727
"brfs": "^1.4.3",
2828
"chai": "^3.5.0",
29-
"enzyme": "^2.4.1",
29+
"enzyme": "^3.1.0",
30+
"enzyme-adapter-react-16": "^1.0.2",
3031
"eslint": "^1.6.0",
3132
"eslint-plugin-react": "^3.5.1",
3233
"gulp": "^3.9.0",
3334
"jest-cli": "^14.1.0",
3435
"jsdom": "^9.8.3",
3536
"lodash": "^4.14.2",
3637
"mocha": "^3.2.0",
37-
"react": "^0.14 || ^15.0.0-rc || ^15.0",
38-
"react-addons-test-utils": "^15.3.1",
38+
"react": "^0.14 || ^15.0.0-rc || ^15.0 || ^16.0",
3939
"react-component-gulp-tasks": "git+https://github.com/gor181/react-component-gulp-tasks.git",
40-
"react-dom": "^0.14 || ^15.0.0-rc || ^15.0",
40+
"react-dom": "^0.14 || ^15.0.0-rc || ^15.0 || ^16.0",
4141
"react-notification-system": "^0.2.7",
4242
"react-redux": "^4.4.5",
4343
"redux": "^3.5.2",
4444
"sinon": "^1.17.6"
4545
},
4646
"dependencies": {
47-
"prop-types": "^15.5.8",
47+
"prop-types": "^15.6.0",
4848
"react-notification-system": "^0.2.x"
4949
},
5050
"peerDependencies": {
51-
"react": "^0.14 || ^15.0.0-rc || ^15.0",
52-
"react-dom": "^0.14 || ^15.0.0-rc || ^15.0"
51+
"react": "^0.14 || ^15.0.0-rc || ^15.0 || ^16.0",
52+
"react-dom": "^0.14 || ^15.0.0-rc || ^15.0 || ^16.0"
5353
},
5454
"browserify-shim": {
5555
"react": "global:React"

test/mocha.opts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
--compilers js:babel-register
22
--require test/utils/dom.js
3+
--require test/utils/enzyme.js
34
--reporter spec

test/utils/enzyme.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import './rafPolyfill';
2+
import { configure } from 'enzyme';
3+
import Adapter from 'enzyme-adapter-react-16';
4+
5+
configure({ adapter: new Adapter() });

test/utils/rafPolyfill.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const raf = global.requestAnimationFrame = (cb) => {
2+
setTimeout(cb, 0);
3+
};
4+
5+
export default raf;

0 commit comments

Comments
 (0)