]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: clear Jest cache before testing
authorKiefer Chang <kiefer.chang@suse.com>
Wed, 29 Jul 2020 13:05:04 +0000 (21:05 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Mon, 17 Aug 2020 05:56:06 +0000 (13:56 +0800)
Jest seems to not detect removed files correctly. Let's clean the cache
before performing frontend unit tests in CI.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/pybind/mgr/dashboard/frontend/package.json

index 9f79529d648a08bd33aa68a29a3b2f7a2eeeafd2..48c21d82914721f837489eb5a236ed0345fbf3e0 100644 (file)
@@ -19,7 +19,7 @@
     "i18n:merge": "npx i18ntool merge -c i18n.config.json",
     "i18n:token": "npx i18ntool config token",
     "test": "jest --watch",
-    "test:ci": "JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter",
+    "test:ci": "jest --clearCache && JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter",
     "e2e": "start-test 4200 'cypress open'",
     "e2e:ci": "start-test 4200 'cypress run -b chrome --headless'",
     "lint:tslint": "ng lint",