]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Use Jest in package.json scripts 22031/head
authorTiago Melo <tmelo@suse.com>
Thu, 17 May 2018 17:08:51 +0000 (18:08 +0100)
committerTiago Melo <tmelo@suse.com>
Thu, 17 May 2018 17:08:51 +0000 (18:08 +0100)
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/run-frontend-unittests.sh

index 0074e8bee1b635898fdca5d127092e6b0fb5ee58..3f3c414cffbceb213d68715ca2bb155f8ffdd9f6 100644 (file)
@@ -66,8 +66,8 @@ production build. Navigate to ``https://localhost:8080``.
 Running Unit Tests
 ~~~~~~~~~~~~~~~~~~
 
-Run ``npm run test`` to execute the unit tests via `Karma
-<https://karma-runner.github.io>`_.
+Run ``npm run test`` to execute the unit tests via `Jest
+<https://facebook.github.io/jest/>`_.
 
 Running End-to-End Tests
 ~~~~~~~~~~~~~~~~~~~~~~~~
index 215dacd162974407ac3bf3250a30bdf4f2891988..edf141d9165d7ba53e6b02772b14eecf2a8a3b14 100644 (file)
@@ -6,7 +6,8 @@
     "ng": "ng",
     "start": "ng serve --delete-output-path false --proxy-config proxy.conf.json --host 0.0.0.0",
     "build": "ng build",
-    "test": "ng test",
+    "test": "jest --watch",
+    "test:ci": "jest --coverage",
     "lint": "ng lint",
     "e2e": "ng e2e",
     "makePretty": "pretty-quick --staged"
index 20303e20edb157d7246407f29d200b4605c7a8e3..ea7522e4c733fbe6fb559fa00b415dd32526af4e 100755 (executable)
@@ -7,7 +7,7 @@ cd $CEPH_ROOT/src/pybind/mgr/dashboard/frontend
 .  $CEPH_ROOT/build/src/pybind/mgr/dashboard/node-env/bin/activate
 
 npm run build -- --prod
-npm run test -- --browsers PhantomJS --watch=false
+npm run test:ci
 npm run lint
 
 deactivate