]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix Jest conflict with coverage files 22155/head
authorTiago Melo <tmelo@suse.com>
Tue, 22 May 2018 14:49:23 +0000 (15:49 +0100)
committerTiago Melo <tmelo@suse.com>
Wed, 30 May 2018 11:06:13 +0000 (12:06 +0100)
It seems 'jest --watch' is trying to determine the modules that are imported
inside the coverage folder.
Since this folder is not always up to date, when there are references to
nonexistent files, Jest will simply break and hang still.

I added an explicit rule for Jest to ignore this folder.

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

index 010e38207e9cf3fb75e8512df7be2d6fe825ba61..d089d0719f20230a2a6545d87c925f6c5524f51a 100644 (file)
       "^.+\\.(ts|html)$": "<rootDir>/node_modules/jest-preset-angular/preprocessor.js",
       "^.+\\.js$": "babel-jest"
     },
-    "setupFiles": [
-      "jest-canvas-mock"
-    ],
-    "coverageReporters": [
-      "text",
-      "cobertura"
-    ]
+    "setupFiles": ["jest-canvas-mock"],
+    "coverageReporters": ["text", "cobertura"],
+    "modulePathIgnorePatterns": ["<rootDir>/coverage/"]
   },
   "dependencies": {
     "@angular/animations": "^5.0.0",