From 76a6bba80c51fc177a7fbd577165064a3151476a Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 9 Oct 2019 12:14:41 +0200 Subject: [PATCH] fix core plugin test execution --- scm-plugins/scm-git-plugin/pom.xml | 4 ---- scm-plugins/scm-hg-plugin/package.json | 3 +-- scm-plugins/scm-hg-plugin/pom.xml | 4 ---- scm-plugins/scm-legacy-plugin/package.json | 3 +-- scm-plugins/scm-svn-plugin/package.json | 3 +-- scm-plugins/scm-svn-plugin/pom.xml | 4 ---- scm-ui/scripts/babelPluginTransformer.js | 2 +- scm-ui/ui-components/package.json | 2 +- scm-ui/ui-components/src/FileSize.test.js | 8 ++++---- scm-ui/ui-webapp/package.json | 2 +- yarn.lock | 14 ++------------ 11 files changed, 12 insertions(+), 37 deletions(-) diff --git a/scm-plugins/scm-git-plugin/pom.xml b/scm-plugins/scm-git-plugin/pom.xml index ac1f007394..0456370c99 100644 --- a/scm-plugins/scm-git-plugin/pom.xml +++ b/scm-plugins/scm-git-plugin/pom.xml @@ -51,10 +51,6 @@ true true - - @scm-manager/ui-types - @scm-manager/ui-components - diff --git a/scm-plugins/scm-hg-plugin/package.json b/scm-plugins/scm-hg-plugin/package.json index 57d3da7a30..ce79a56a1d 100644 --- a/scm-plugins/scm-hg-plugin/package.json +++ b/scm-plugins/scm-hg-plugin/package.json @@ -4,8 +4,7 @@ "license": "BSD-3-Clause", "main": "src/main/js/index.js", "scripts": { - "build": "webpack --mode=development", - "test": "jest --config=../../scm-ui/scripts/jest-plugin.config.js" + "build": "webpack --mode=development" }, "jest": { "transform": { diff --git a/scm-plugins/scm-hg-plugin/pom.xml b/scm-plugins/scm-hg-plugin/pom.xml index e5decb0567..e57652bf0f 100644 --- a/scm-plugins/scm-hg-plugin/pom.xml +++ b/scm-plugins/scm-hg-plugin/pom.xml @@ -57,10 +57,6 @@ true true - - @scm-manager/ui-types - @scm-manager/ui-components - diff --git a/scm-plugins/scm-legacy-plugin/package.json b/scm-plugins/scm-legacy-plugin/package.json index 9ecd93595e..6223ac6d87 100644 --- a/scm-plugins/scm-legacy-plugin/package.json +++ b/scm-plugins/scm-legacy-plugin/package.json @@ -4,8 +4,7 @@ "license": "BSD-3-Clause", "main": "src/main/js/index.js", "scripts": { - "build": "webpack --mode=development", - "test": "jest --config=../../scm-ui/scripts/jest-plugin.config.js" + "build": "webpack --mode=development" }, "jest": { "transform": { diff --git a/scm-plugins/scm-svn-plugin/package.json b/scm-plugins/scm-svn-plugin/package.json index fccbe9ac32..e8eb08bec6 100644 --- a/scm-plugins/scm-svn-plugin/package.json +++ b/scm-plugins/scm-svn-plugin/package.json @@ -4,8 +4,7 @@ "version": "2.0.0-SNAPSHOT", "license": "BSD-3-Clause", "scripts": { - "build": "webpack --mode=development", - "test": "jest --config=../../scm-ui/scripts/jest-plugin.config.js" + "build": "webpack --mode=development" }, "jest": { "transform": { diff --git a/scm-plugins/scm-svn-plugin/pom.xml b/scm-plugins/scm-svn-plugin/pom.xml index 83da627eb9..8ed7a7bef4 100644 --- a/scm-plugins/scm-svn-plugin/pom.xml +++ b/scm-plugins/scm-svn-plugin/pom.xml @@ -44,10 +44,6 @@ smp-maven-plugin true - - @scm-manager/ui-types - @scm-manager/ui-components - diff --git a/scm-ui/scripts/babelPluginTransformer.js b/scm-ui/scripts/babelPluginTransformer.js index e7fc404434..2341f05bc2 100644 --- a/scm-ui/scripts/babelPluginTransformer.js +++ b/scm-ui/scripts/babelPluginTransformer.js @@ -4,7 +4,7 @@ const path = require("path"); const { createTransformer } = require("babel-jest"); -const packagePath = path.resolve(__dirname, "../"); +const packagePath = path.resolve(__dirname, ".."); const packageGlob = path.join(packagePath, "*"); const currentDirectory = path.join(process.cwd()); diff --git a/scm-ui/ui-components/package.json b/scm-ui/ui-components/package.json index c868d7c19b..526808bb74 100644 --- a/scm-ui/ui-components/package.json +++ b/scm-ui/ui-components/package.json @@ -19,7 +19,7 @@ "create-index": "^2.3.0", "enzyme": "^3.5.0", "enzyme-adapter-react-16": "^1.3.1", - "fetch-mock": "^7.2.5", + "fetch-mock": "^7.5.1", "flow-bin": "^0.109.0", "flow-typed": "^2.5.1", "raf": "^3.4.0", diff --git a/scm-ui/ui-components/src/FileSize.test.js b/scm-ui/ui-components/src/FileSize.test.js index 8ecb53e1bb..993059477f 100644 --- a/scm-ui/ui-components/src/FileSize.test.js +++ b/scm-ui/ui-components/src/FileSize.test.js @@ -3,8 +3,8 @@ import FileSize from "./FileSize"; it("should format bytes", () => { expect(FileSize.format(0)).toBe("0 B"); expect(FileSize.format(160)).toBe("160 B"); - expect(FileSize.format(6304)).toBe("6.16 K"); - expect(FileSize.format(28792588)).toBe("27.46 M"); - expect(FileSize.format(1369510189)).toBe("1.28 G"); - expect(FileSize.format(42949672960)).toBe("40.00 G"); + expect(FileSize.format(6304)).toBe("6.30 K"); + expect(FileSize.format(28792588)).toBe("28.79 M"); + expect(FileSize.format(1369510189)).toBe("1.37 G"); + expect(FileSize.format(42949672960)).toBe("42.95 G"); }); diff --git a/scm-ui/ui-webapp/package.json b/scm-ui/ui-webapp/package.json index a9d818795d..3b88ba26dd 100644 --- a/scm-ui/ui-webapp/package.json +++ b/scm-ui/ui-webapp/package.json @@ -58,7 +58,7 @@ "copyfiles": "^2.0.0", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", - "fetch-mock": "^6.5.0", + "fetch-mock": "^7.5.1", "flow-bin": "^0.109.0", "flow-typed": "^2.6.1", "node-sass": "^4.9.3", diff --git a/yarn.lock b/yarn.lock index 564341b9e9..9eb1a67aae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3863,16 +3863,7 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fetch-mock@^6.5.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-6.5.2.tgz#b3842b305c13ea0f81c85919cfaa7de387adfa3e" - integrity sha512-EIvbpCLBTYyDLu4HJiqD7wC8psDwTUaPaWXNKZbhNO/peUYKiNp5PkZGKRJtnTxaPQu71ivqafvjpM7aL+MofQ== - dependencies: - babel-polyfill "^6.26.0" - glob-to-regexp "^0.4.0" - path-to-regexp "^2.2.1" - -fetch-mock@^7.2.5: +fetch-mock@^7.5.1: version "7.5.1" resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-7.5.1.tgz#78fc8e4ffc7d7cdd6048b6e501f21be2db489352" integrity sha512-yTb46p7y14bfyWCox50lYqs6NRSo7XPOKzsnLzrSOqRWAGLsvF+aAv0dPkTLeKaBeH3aVSVwWeXzMrctXEZVag== @@ -4289,8 +4280,7 @@ getpass@^0.1.1: gitdiff-parser@^0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/gitdiff-parser/-/gitdiff-parser-0.1.2.tgz#26a256e05e9c2d5016b512a96c1dacb40862b92a" - integrity sha512-glDM6E1AwLYYTOPyI0CqamNEUSuwwAkmwULWpE2sHMpMZNzGJwErt7+eV+yIZcsbDza0pVSlwlBHFWbTf2Wu7A== + resolved "https://github.com/cloudogu/gitdiff-parser#3a72da4a8e3d9bfb4b9e01a43e85628c19f26cc4" glob-parent@^3.1.0: version "3.1.0"