diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2019-03-22 14:20:57 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-03-29 09:44:59 +0100 |
commit | 9d62bc6df05b958d154e831a52302e46b89e7d77 (patch) | |
tree | ee3c5ba6c29040619a8fcfbae99b487ff10685bb | |
parent | 17bbc381c796efc51326c96e77c0fe7294c6a010 (diff) | |
download | sonarqube-9d62bc6df05b958d154e831a52302e46b89e7d77.tar.gz sonarqube-9d62bc6df05b958d154e831a52302e46b89e7d77.zip |
Update jest and enzyme
* Update jest snapshots
15 files changed, 37 insertions, 33 deletions
diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json index 5e7d9582c05..afea2a68bb5 100644 --- a/server/sonar-docs/package.json +++ b/server/sonar-docs/package.json @@ -24,17 +24,17 @@ }, "devDependencies": { "@types/classnames": "2.2.7", - "@types/enzyme": "3.1.15", - "@types/jest": "23.3.13", + "@types/enzyme": "3.9.0", + "@types/jest": "24.0.11", "@types/lodash": "4.14.119", "@types/lunr": "2.3.0", "@types/react": "16.7.18", "@types/react-dom": "16.0.11", "@types/react-helmet": "5.0.8", "@typescript-eslint/parser": "1.5.0", - "babel-jest": "23.6.0", - "enzyme": "3.8.0", - "enzyme-adapter-react-16": "1.7.1", + "babel-jest": "24.5.0", + "enzyme": "3.9.0", + "enzyme-adapter-react-16": "1.10.0", "enzyme-to-json": "3.3.5", "eslint": "5.15.3", "eslint-config-sonarqube": "0.3.0", @@ -46,7 +46,7 @@ "fs-extra": "7.0.1", "glob-promise": "3.4.0", "graphql-code-generator": "0.5.2", - "jest": "23.6.0", + "jest": "24.5.0", "prettier": "1.16.0", "react-test-renderer": "16.6.0", "remark": "10.0.1", diff --git a/server/sonar-vsts/package.json b/server/sonar-vsts/package.json index 2fe83b0be2e..5543c146179 100644 --- a/server/sonar-vsts/package.json +++ b/server/sonar-vsts/package.json @@ -24,15 +24,15 @@ "@babel/preset-env": "7.1.0", "@babel/preset-react": "7.0.0", "@types/classnames": "2.2.6", - "@types/enzyme": "3.1.14", - "@types/jest": "23.3.7", + "@types/enzyme": "3.9.1", + "@types/jest": "24.0.11", "@types/lodash": "4.14.117", "@types/react": "16.8.8", "@types/react-dom": "16.8.3", "@typescript-eslint/parser": "1.5.0", "autoprefixer": "9.3.1", "babel-core": "7.0.0-bridge.0", - "babel-jest": "23.6.0", + "babel-jest": "24.5.0", "babel-loader": "8.0.4", "babel-plugin-dynamic-import-node": "2.2.0", "babel-plugin-lodash": "3.3.4", @@ -40,9 +40,9 @@ "clean-webpack-plugin": "0.1.19", "copy-webpack-plugin": "4.5.4", "css-loader": "1.0.0", - "enzyme": "3.7.0", - "enzyme-adapter-react-16": "1.6.0", - "enzyme-to-json": "3.3.4", + "enzyme": "3.9.0", + "enzyme-adapter-react-16": "1.10.0", + "enzyme-to-json": "3.3.5", "escape-string-regexp": "1.0.5", "eslint": "5.15.3", "eslint-config-sonarqube": "0.3.0", @@ -52,14 +52,14 @@ "eslint-plugin-react": "7.12.4", "eslint-plugin-sonarjs": "0.3.0", "html-webpack-plugin": "3.2.0", - "jest": "23.6.0", + "jest": "24.5.0", "postcss-calc": "7.0.0", "postcss-custom-properties": "8.0.8", "postcss-loader": "3.0.0", "prettier": "1.14.3", "react-dev-utils": "5.0.0", "react-error-overlay": "1.0.7", - "react-test-renderer": "16.8.4", + "react-test-renderer": "16.8.5", "style-loader": "0.23.1", "ts-jest": "24.0.0", "ts-loader": "5.3.3", diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 4d0cb91ef7b..b9245fe732e 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -65,8 +65,8 @@ "@types/d3-selection": "1.3.2", "@types/d3-shape": "1.2.4", "@types/d3-zoom": "1.7.2", - "@types/enzyme": "3.1.14", - "@types/jest": "23.3.7", + "@types/enzyme": "3.9.1", + "@types/jest": "24.0.11", "@types/keymaster": "1.6.28", "@types/lodash": "4.14.117", "@types/prop-types": "15.7.0", @@ -83,7 +83,7 @@ "@typescript-eslint/parser": "1.5.0", "autoprefixer": "9.3.1", "babel-core": "7.0.0-bridge.0", - "babel-jest": "23.6.0", + "babel-jest": "24.5.0", "babel-loader": "8.0.4", "babel-plugin-dynamic-import-node": "2.2.0", "babel-plugin-lodash": "3.3.4", @@ -91,9 +91,9 @@ "clean-webpack-plugin": "0.1.19", "copy-webpack-plugin": "4.5.4", "css-loader": "1.0.0", - "enzyme": "3.7.0", - "enzyme-adapter-react-16": "1.6.0", - "enzyme-to-json": "3.3.4", + "enzyme": "3.9.0", + "enzyme-adapter-react-16": "1.10.0", + "enzyme-to-json": "3.3.5", "escape-string-regexp": "1.0.5", "eslint": "5.15.3", "eslint-config-sonarqube": "0.3.0", @@ -106,7 +106,7 @@ "glob": "7.1.3", "glob-promise": "3.4.0", "html-webpack-plugin": "3.2.0", - "jest": "23.6.0", + "jest": "24.5.0", "lint-staged": "7.3.0", "lodash-webpack-plugin": "0.11.5", "mini-css-extract-plugin": "0.4.4", @@ -117,7 +117,7 @@ "raw-loader": "0.5.1", "react-dev-utils": "5.0.1", "react-error-overlay": "1.0.7", - "react-test-renderer": "16.8.4", + "react-test-renderer": "16.8.5", "remark": "9.0.0", "remark-react": "4.0.3", "style-loader": "0.23.1", diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx index ff7aba0434b..3c7c7492e29 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx @@ -28,7 +28,7 @@ jest.mock('../embed-docs-modal/SuggestionsProvider', () => { return this.props.children; } } - + return { default: SuggestionsProvider }; }); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap index 484a153d105..5d4c5d631f2 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap @@ -20,6 +20,7 @@ exports[`should render correctly 1`] = ` location={ Object { "action": "PUSH", + "hash": "", "key": "key", "pathname": "/path", "query": Object {}, diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx index 49a261ed482..eb8bf725f06 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx @@ -25,7 +25,6 @@ it('should render correctly, and (un)register the link when (un)mounted', () => const link = { key: 'main', label: 'Skip to content' }; const addA11ySkipLink = jest.fn(); const removeA11ySkipLink = jest.fn(); - const wrapper = mount( <A11ySkipTargetInner addA11ySkipLink={addA11ySkipLink} diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap b/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap index f0130990dac..8fa473020e6 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap @@ -15,7 +15,7 @@ exports[`should render correctly, and (un)register the link when (un)mounted 1`] ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap index c4a8c0e54b4..f1923220a93 100644 --- a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap @@ -27,7 +27,7 @@ exports[`should render correctly 1`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], @@ -36,6 +36,7 @@ exports[`should render correctly 1`] = ` location={ Object { "action": "PUSH", + "hash": "", "key": "key", "pathname": "/path", "query": Object {}, @@ -48,6 +49,7 @@ exports[`should render correctly 1`] = ` location={ Object { "action": "PUSH", + "hash": "", "key": "key", "pathname": "/path", "query": Object {}, diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap index 43ce253d98d..9ede472a8d9 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap @@ -53,7 +53,7 @@ exports[`should render and create organization 2`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap index f6dad80158a..3c461b88591 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap @@ -9,6 +9,7 @@ exports[`should render correctly for SonarCloud 1`] = ` location={ Object { "action": "PUSH", + "hash": "", "key": "key", "pathname": "/path", "query": Object {}, @@ -44,6 +45,7 @@ exports[`should render correctly for SonarQube 1`] = ` location={ Object { "action": "PUSH", + "hash": "", "key": "key", "pathname": "/path", "query": Object {}, diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap index bbf778c3c50..2b82e47237e 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap @@ -623,7 +623,7 @@ exports[`should edit members 3`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap index f6722a21bf6..b043072b6a9 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap @@ -107,7 +107,7 @@ exports[`creates new project 3`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], @@ -261,7 +261,7 @@ exports[`deletes project 3`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx index a486991cafe..726948dbd10 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx @@ -38,7 +38,7 @@ const excludedUsers = ['admin']; describe('UsersSelectSearch', () => { it('should render correctly', () => { - const onSearch = jest.fn(() => Promise.resolve(users)); + const onSearch = jest.fn().mockResolvedValue({ users }); const wrapper = shallow( <UsersSelectSearch excludedUsers={excludedUsers} diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap index 4394ef55ac3..3013f367162 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap @@ -51,7 +51,7 @@ exports[`should be actionable 2`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap index dd0111a0502..dfb462c293f 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap @@ -19,7 +19,7 @@ exports[`should open the popup when the button is clicked 1`] = ` ], "results": Array [ Object { - "isThrow": false, + "type": "return", "value": undefined, }, ], |