From: Tiago Melo Date: Tue, 22 May 2018 14:49:23 +0000 (+0100) Subject: mgr/dashboard: Fix Jest conflict with coverage files X-Git-Tag: v14.0.1~1235^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ee8d250479b0a03fbe6bf8ae64ba7cc554015121;p=ceph.git mgr/dashboard: Fix Jest conflict with coverage files 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 --- diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index 010e38207e9cf..d089d0719f202 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -23,13 +23,9 @@ "^.+\\.(ts|html)$": "/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": ["/coverage/"] }, "dependencies": { "@angular/animations": "^5.0.0",