]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Reduce Jest logs in CI 24764/head
authorTiago Melo <tmelo@suse.com>
Thu, 25 Oct 2018 23:10:36 +0000 (00:10 +0100)
committerTiago Melo <tmelo@suse.com>
Thu, 25 Oct 2018 23:21:34 +0000 (00:21 +0100)
With the current number of unit tests we have for the frontend the output from
Jest is too big, and is exceeding the limit from jenkins.
This is resulting in the omission of linting results.

With this change, Jest will only output the results of failing tests and will no
longer show the coverage in the logs.
Jenkins will keep tracking the coverage via the generated cobertura file.

Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/package-lock.json
src/pybind/mgr/dashboard/frontend/package.json

index a7e597617e18a2d9df02a1eb8b3986f5b2a6a7d6..6e61b424b895bb95c1f467d1144517b5dcf2090d 100644 (file)
       "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=",
       "dev": true
     },
+    "jest-silent-reporter": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/jest-silent-reporter/-/jest-silent-reporter-0.1.1.tgz",
+      "integrity": "sha512-nrRzOV4151hG354tnVWfyZbFGJdylpadRWYWWPSD+WeOz2hQOjUGxvIFODnaY9cKQ7JWCtG+5LgSss22ccRhBg==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.3.1",
+        "jest-util": "^23.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+          "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        }
+      }
+    },
     "jest-snapshot": {
       "version": "23.4.2",
       "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.4.2.tgz",
index 7f388544b512ea0873ce5c719130659d721f3090..1aba6ddb4477379c22ca30efa734632deb512520 100644 (file)
@@ -7,7 +7,7 @@
     "start": "ng serve --host 0.0.0.0",
     "build": "ng build",
     "test": "jest --watch",
-    "test:ci": "jest --coverage",
+    "test:ci": "JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter",
     "e2e": "ng e2e",
     "lint:tslint": "ng lint ceph-dashboard ceph-dashboard-e2e",
     "lint:prettier": "prettier --list-different \"{src,e2e}/**/*.{ts,scss}\"",
@@ -16,7 +16,6 @@
     "fix:prettier": "prettier --write \"{src,e2e}/**/*.{ts,scss}\"",
     "fix:tslint": "npm run lint:tslint -- --fix",
     "fix": "npm run fix:tslint; npm run fix:prettier"
-
   },
   "private": true,
   "jest": {
@@ -33,7 +32,6 @@
       "jest-canvas-mock"
     ],
     "coverageReporters": [
-      "text",
       "cobertura",
       "html"
     ],
@@ -85,6 +83,7 @@
     "jest": "23.4.2",
     "jest-canvas-mock": "1.1.0",
     "jest-preset-angular": "6.0.0",
+    "jest-silent-reporter": "0.1.1",
     "prettier": "1.14.0",
     "protractor": "5.4.0",
     "ts-node": "7.0.0",