jest-sonar
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.2.7](https://github.com/sh33dafi/jest-sonar/compare/v0.2.6...v0.2.7) (2020-04-25) | ||
### Bug Fixes | ||
* **#20:** use coverage directory to generate report ([33adbd2](https://github.com/sh33dafi/jest-sonar/commit/33adbd226675ea45e5be02ee25a4d2fe130988dc)), closes [#20](https://github.com/sh33dafi/jest-sonar/issues/20) | ||
### [0.2.6](https://github.com/sh33dafi/jest-sonar/compare/v0.2.5...v0.2.6) (2020-04-25) | ||
@@ -7,0 +14,0 @@ |
{ | ||
"name": "jest-sonar", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "A sonar reporter for jest", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"scripts": { | ||
"release": "standard-version", | ||
"release": "standard-version -s", | ||
"test": "jest --collect-coverage", | ||
@@ -20,0 +20,0 @@ "lint": "eslint ." |
@@ -5,11 +5,6 @@ const Reporter = require('./reporter'); | ||
const DEFAULT_OPTIONS = { | ||
outputDirectory: '', | ||
outputName: 'sonar-report.xml' | ||
}; | ||
class JestSonar { | ||
constructor(globalConfig, options) { | ||
this.config = this.getConfig(globalConfig); | ||
this.options = this.getOptions(options); | ||
this.options = this.getOptions(options, this.config); | ||
} | ||
@@ -35,4 +30,11 @@ | ||
getOptions(options) { | ||
return Object.assign({}, DEFAULT_OPTIONS, options); | ||
getOptions(options, config) { | ||
return Object.assign( | ||
{}, | ||
{ | ||
outputName: 'sonar-report.xml', | ||
outputDirectory: config.coverageDirectory || '' | ||
}, | ||
options | ||
); | ||
} | ||
@@ -39,0 +41,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
243362
22
292
3