jest-sonar
Advanced tools
Comparing version 0.2.14 to 0.2.15
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.2.15](https://github.com/sh33dafi/jest-sonar/compare/v0.2.14...v0.2.15) (2022-12-11) | ||
### Features | ||
* **#36:** respect <rootDir> in outputDirectory ([5257cff](https://github.com/sh33dafi/jest-sonar/commit/5257cff8fe546b7bf364ff77a129c3ca50d2a72b)), closes [#36](https://github.com/sh33dafi/jest-sonar/issues/36) | ||
### [0.2.14](https://github.com/sh33dafi/jest-sonar/compare/v0.2.13...v0.2.14) (2022-12-09) | ||
@@ -7,0 +14,0 @@ |
{ | ||
"name": "jest-sonar", | ||
"version": "0.2.14", | ||
"version": "0.2.15", | ||
"description": "A sonar reporter for jest", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -29,3 +29,6 @@ const fs = require('fs'); | ||
return path.resolve( | ||
this.options.outputDirectory, | ||
this.replaceRootDirInPath( | ||
this.config.rootDir, | ||
this.options.outputDirectory | ||
), | ||
this.options.outputName | ||
@@ -61,4 +64,15 @@ ); | ||
} | ||
replaceRootDirInPath(rootDir, filePath) { | ||
if (!filePath || !/^<rootDir>/.test(filePath)) { | ||
return filePath; | ||
} | ||
return path.resolve( | ||
rootDir, | ||
path.normalize('./' + filePath.substring('<rootDir>'.length)) | ||
); | ||
} | ||
} | ||
module.exports = JestSonar; |
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
19819
183