]> source.dussan.org Git - sonarqube.git/commitdiff
add coverage reporting for web tests
authorStas Vilchik <vilchiks@gmail.com>
Wed, 30 Sep 2015 13:45:27 +0000 (15:45 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 30 Sep 2015 14:22:26 +0000 (16:22 +0200)
server/sonar-web/.istanbul.yml [new file with mode: 0644]
server/sonar-web/package.json

diff --git a/server/sonar-web/.istanbul.yml b/server/sonar-web/.istanbul.yml
new file mode 100644 (file)
index 0000000..3bb2987
--- /dev/null
@@ -0,0 +1,5 @@
+instrumentation:
+  root: 'src/main/js'
+  extensions:
+    - .js
+    - .jsx
index 0aede03a2f975a24b788d51833d95b44e4b7bab8..c6de70b2cfe9392ffea957e0fbea6c02d7993405 100644 (file)
@@ -23,6 +23,7 @@
     "grunt-rename": "^0.1.4",
     "grunt-text-replace": "0.4.0",
     "intern": "3.0.0",
+    "isparta": "^3.0.4",
     "jit-grunt": "0.9.1",
     "jquery": "2.1.4",
     "jsdom": "^6.5.1",
@@ -36,6 +37,7 @@
   "scripts": {
     "build-fast": "./node_modules/.bin/grunt build-fast",
     "build": "./node_modules/.bin/grunt build",
-    "test": "./node_modules/.bin/mocha --opts tests/mocha.opts tests"
+    "test": "./node_modules/.bin/mocha --opts tests/mocha.opts tests",
+    "coverage": "./node_modules/.bin/babel-node ./node_modules/.bin/isparta cover --dir './target/coverage' --include '**/*.js' --include '**/*.jsx' ./node_modules/.bin/_mocha -- --opts tests/mocha.opts tests"
   }
 }