diff --git a/package.json b/package.json index 3e56fbb8..53f0f8d1 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "url": "git+ssh://git@github.com/LLK/scratch-paint.git" }, "peerDependencies": { - "react": "^15", - "react-dom": "^15" + "react": "^16", + "react-dom": "^16" }, "devDependencies": { "autoprefixer": "7.1.2", @@ -39,7 +39,8 @@ "babel-preset-react": "^6.22.0", "classnames": "2.2.5", "css-loader": "0.28.3", - "enzyme": "^2.8.2", + "enzyme": "^3.1.0", + "enzyme-adapter-react-16": "^1.0.1", "eslint": "^4.4.1", "eslint-config-import": "^0.13.0", "eslint-config-scratch": "^4.0.0", @@ -58,12 +59,13 @@ "postcss-loader": "^2.0.5", "postcss-simple-vars": "^4.0.0", "prop-types": "^15.5.10", - "react": "15.6.1", - "react-dom": "15.6.1", - "react-intl": "2.3.0", + "raf": "^3.4.0", + "react": "16.0.0", + "react-dom": "16.0.0", + "react-intl": "2.4.0", "react-intl-redux": "0.6.0", "react-redux": "5.0.5", - "react-test-renderer": "^15.5.4", + "react-test-renderer": "^16.0.0", "redux": "3.7.0", "redux-mock-store": "^1.2.3", "redux-throttle": "0.1.1", @@ -75,6 +77,10 @@ "webpack-dev-server": "^2.7.0" }, "jest": { + "setupFiles": [ + "raf/polyfill", + "/test/helpers/enzyme-setup.js" + ], "moduleNameMapper": { "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/test/__mocks__/fileMock.js", "\\.(css|less)$": "/test/__mocks__/styleMock.js" diff --git a/test/helpers/enzyme-setup.js b/test/helpers/enzyme-setup.js new file mode 100644 index 00000000..5374f679 --- /dev/null +++ b/test/helpers/enzyme-setup.js @@ -0,0 +1,4 @@ +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; + +Enzyme.configure({adapter: new Adapter()});