From: Stas Vilchik Date: Wed, 30 Sep 2015 13:45:27 +0000 (+0200) Subject: add coverage reporting for web tests X-Git-Tag: 5.2-RC1~177 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0a325ad503de115158a31306f69d65cf0a06b167;p=sonarqube.git add coverage reporting for web tests --- diff --git a/server/sonar-web/.istanbul.yml b/server/sonar-web/.istanbul.yml new file mode 100644 index 00000000000..3bb29874399 --- /dev/null +++ b/server/sonar-web/.istanbul.yml @@ -0,0 +1,5 @@ +instrumentation: + root: 'src/main/js' + extensions: + - .js + - .jsx diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 0aede03a2f9..c6de70b2cfe 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -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" } }