sonar-js-coverage-convertor
Because Sonarqube is unable to generate coverage for Javascript applications, this module will convert Istanbul reports to a generic format which Sonarqube can interpret. Convert Istanbul clover coverage reports to SonarQube Generic Data format for Polymer app usage.
Usage
If you have multiple coverage files which you need to merge, do so prior to running the convertor. See Merge Module
for details.
From npm run scripts
npm run sonarCoverage
wct.conf.json
Example
mocha
Example Generate server-side coverage reports
nyc --report-dir ./coverage-server --reporter lcov --reporter json --reporter clover mocha server/**/*.spec.js
Merge Module
This module is used to merge multiple coverage reports prior to converting the single resulting report to Sonarqube's generic coverage format.
COVERAGE_DIR=coverage istanbul-merge coverageDir1/coverage-final.json coverageDir2/coverage-final.jsonCOVERAGE_DIR=outDir istanbul-merge dir1/in.json dir2/in.jsonistanbul-merge dir1/in.json dir2/in.json