diff --git a/package.json b/package.json index 8ccf652360..ea534fd266 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "devtools-source-map": "^0.14.8", "devtools-splitter": "^0.0.6", "devtools-utils": "^0.0.11", + "enzyme-adapter-react-16": "^1.1.1", "eslint-plugin-import": "^2.8.0", "fuzzaldrin-plus": "^0.6.0", "immutable": "^3.8.2", @@ -84,8 +85,8 @@ "parse-script-tags": "^0.1.6", "pretty-fast": "^0.2.3", "prop-types": "^15.6.0", - "react": "^15.6.2", - "react-dom": "^15.6.2", + "react": "16.2.0", + "react-dom": "16.2.0", "react-immutable-proptypes": "^2.1.0", "react-inlinesvg": "^0.7.4", "react-redux": "^5.0.6", @@ -115,7 +116,6 @@ "devtools-license-check": "^0.7.0", "documentation": "^5.2.1", "enzyme": "^3.3.0", - "enzyme-adapter-react-15": "1.0.5", "enzyme-to-json": "3.3.1", "eslint": "^4.2.0", "eslint-config-prettier": "^2.3.0", @@ -141,7 +141,6 @@ "node-emoji": "^1.8.1", "npm-run-all": "^4.0.2", "prettier": "^1.10.2", - "react-addons-perf": "^15.4.2", "react-test-renderer": "15.6.2", "remark-cli": "^5.0.0", "remark-lint": "^6.0.1", @@ -188,7 +187,7 @@ ], "transformIgnorePatterns": ["node_modules/(?!devtools-)"], "setupTestFrameworkScriptFile": "/src/test/tests-setup.js", - "setupFiles": ["jest-localstorage-mock"], + "setupFiles": ["/src/test/shim.js", "jest-localstorage-mock"], "snapshotSerializers": [ "jest-serializer-babel-ast", "enzyme-to-json/serializer" diff --git a/src/components/Editor/tests/Editor.spec.js b/src/components/Editor/tests/Editor.spec.js index 38ca3bafb1..dbe340ba63 100644 --- a/src/components/Editor/tests/Editor.spec.js +++ b/src/components/Editor/tests/Editor.spec.js @@ -80,7 +80,7 @@ describe("Editor", () => { selectedSource: I.fromJS({ loadedState: "loading" }) }); - expect(mockEditor.setText.mock.calls).toEqual([[""], ["Loading…"]]); + expect(mockEditor.setText.mock.calls).toEqual([["Loading…"]]); expect(mockEditor.codeMirror.scrollTo.mock.calls).toEqual([]); }); }); @@ -96,7 +96,7 @@ describe("Editor", () => { selectedLocation: { sourceId: "foo", line: 3, column: 1 } }); - expect(mockEditor.setText.mock.calls).toEqual([[""], ["the text"]]); + expect(mockEditor.setText.mock.calls).toEqual([["the text"]]); expect(mockEditor.codeMirror.scrollTo.mock.calls).toEqual([[1, 2]]); }); }); @@ -117,7 +117,6 @@ describe("Editor", () => { }); expect(mockEditor.setText.mock.calls).toEqual([ - [""], ["Error loading this URI: error text"] ]); }); @@ -138,7 +137,6 @@ describe("Editor", () => { }); expect(mockEditor.setText.mock.calls).toEqual([ - [""], ["Please refresh to debug this module"] ]); }); @@ -166,7 +164,6 @@ describe("Editor", () => { }); expect(mockEditor.setText.mock.calls).toEqual([ - [""], ["the text"], ["Loading…"] ]); @@ -196,7 +193,6 @@ describe("Editor", () => { }); expect(mockEditor.setText.mock.calls).toEqual([ - [""], ["Loading…"], ["the text"] ]); diff --git a/src/components/tests/__snapshots__/QuickOpenModal.spec.js.snap b/src/components/tests/__snapshots__/QuickOpenModal.spec.js.snap index f0a718ff43..4efde8e477 100644 --- a/src/components/tests/__snapshots__/QuickOpenModal.spec.js.snap +++ b/src/components/tests/__snapshots__/QuickOpenModal.spec.js.snap @@ -1458,14 +1458,14 @@ exports[`QuickOpenModal updateResults on enable 2`] = ` >
setTimeout(callback, 0); diff --git a/src/test/tests-setup.js b/src/test/tests-setup.js index 2b078efc4f..5e83ab4220 100644 --- a/src/test/tests-setup.js +++ b/src/test/tests-setup.js @@ -5,7 +5,7 @@ import getConfig from "../../bin/getConfig"; import { setConfig, getValue } from "devtools-config"; import { readFileSync } from "fs"; import Enzyme from "enzyme"; -import Adapter from "enzyme-adapter-react-15"; +import Adapter from "enzyme-adapter-react-16"; import { startSourceMapWorker, stopSourceMapWorker } from "devtools-source-map"; diff --git a/yarn.lock b/yarn.lock index c125bb7292..0641624cf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2769,7 +2769,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.6.0, create-react-class@^15.6.2: +create-react-class@^15.6.2: version "15.6.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" dependencies: @@ -3654,17 +3654,19 @@ envify@^3.0.0: jstransform "^11.0.3" through "~2.3.4" -enzyme-adapter-react-15@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/enzyme-adapter-react-15/-/enzyme-adapter-react-15-1.0.5.tgz#99f9a03ff2c2303e517342935798a6bdfbb75fac" +enzyme-adapter-react-16@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.1.1.tgz#a8f4278b47e082fbca14f5bfb1ee50ee650717b4" dependencies: - enzyme-adapter-utils "^1.1.0" + enzyme-adapter-utils "^1.3.0" lodash "^4.17.4" object.assign "^4.0.4" object.values "^1.0.4" - prop-types "^15.5.10" + prop-types "^15.6.0" + react-reconciler "^0.7.0" + react-test-renderer "^16.0.0-0" -enzyme-adapter-utils@^1.1.0: +enzyme-adapter-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.3.0.tgz#d6c85756826c257a8544d362cc7a67e97ea698c7" dependencies: @@ -4300,7 +4302,7 @@ fbjs@^0.6.1: ua-parser-js "^0.7.9" whatwg-fetch "^0.9.0" -fbjs@^0.8.12, fbjs@^0.8.16, fbjs@^0.8.4, fbjs@^0.8.9: +fbjs@^0.8.12, fbjs@^0.8.16, fbjs@^0.8.9: version "0.8.16" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" dependencies: @@ -9033,13 +9035,6 @@ rc@^1.1.0, rc@^1.1.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-addons-perf@^15.4.2: - version "15.4.2" - resolved "https://registry.yarnpkg.com/react-addons-perf/-/react-addons-perf-15.4.2.tgz#110bdcf5c459c4f77cb85ed634bcd3397536383b" - dependencies: - fbjs "^0.8.4" - object-assign "^4.1.0" - react-docgen@^2.20.0: version "2.20.1" resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-2.20.1.tgz#29c3a1216066f513958abb1a43678860bbd51c7f" @@ -9056,20 +9051,7 @@ react-dom-factories@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.2.tgz#eb7705c4db36fb501b3aa38ff759616aa0ff96e0" -react-dom@^0.14.0: - version "0.14.9" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-0.14.9.tgz#05064a3dcf0fb1880a3b2bfc9d58c55d8d9f6293" - -react-dom@^15.6.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.1.0" - object-assign "^4.1.0" - prop-types "^15.5.10" - -react-dom@^16.2.0: +react-dom@16.2.0, react-dom@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044" dependencies: @@ -9078,6 +9060,10 @@ react-dom@^16.2.0: object-assign "^4.1.1" prop-types "^15.6.0" +react-dom@^0.14.0: + version "0.14.9" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-0.14.9.tgz#05064a3dcf0fb1880a3b2bfc9d58c55d8d9f6293" + react-fuzzy@^0.5.1: version "0.5.2" resolved "https://registry.yarnpkg.com/react-fuzzy/-/react-fuzzy-0.5.2.tgz#fc13bf6f0b785e5fefe908724efebec4935eaefe" @@ -9129,6 +9115,15 @@ react-modal@^3.1.10: prop-types "^15.5.10" warning "^3.0.0" +react-reconciler@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.7.0.tgz#9614894103e5f138deeeb5eabaf3ee80eb1d026d" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + react-redux@^5.0.6: version "5.0.7" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.7.tgz#0dc1076d9afb4670f993ffaef44b8f8c1155a4c8" @@ -9161,6 +9156,14 @@ react-test-renderer@15.6.2: fbjs "^0.8.9" object-assign "^4.1.0" +react-test-renderer@^16.0.0-0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211" + dependencies: + fbjs "^0.8.16" + object-assign "^4.1.1" + prop-types "^15.6.0" + react-transition-group@^1.1.2: version "1.2.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6" @@ -9193,24 +9196,7 @@ react-treebeard@^2.1.0: shallowequal "^0.2.2" velocity-react "^1.3.1" -react@^0.14.0: - version "0.14.9" - resolved "https://registry.yarnpkg.com/react/-/react-0.14.9.tgz#9110a6497c49d44ba1c0edd317aec29c2e0d91d1" - dependencies: - envify "^3.0.0" - fbjs "^0.6.1" - -react@^15.6.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72" - dependencies: - create-react-class "^15.6.0" - fbjs "^0.8.9" - loose-envify "^1.1.0" - object-assign "^4.1.0" - prop-types "^15.5.10" - -react@^16.2.0: +react@16.2.0, react@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba" dependencies: @@ -9219,6 +9205,13 @@ react@^16.2.0: object-assign "^4.1.1" prop-types "^15.6.0" +react@^0.14.0: + version "0.14.9" + resolved "https://registry.yarnpkg.com/react/-/react-0.14.9.tgz#9110a6497c49d44ba1c0edd317aec29c2e0d91d1" + dependencies: + envify "^3.0.0" + fbjs "^0.6.1" + read-all-stream@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa"