Gathering detailed insights and metrics for jest-sonar
Gathering detailed insights and metrics for jest-sonar
Gathering detailed insights and metrics for jest-sonar
Gathering detailed insights and metrics for jest-sonar
npm install jest-sonar
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
51 Stars
120 Commits
9 Forks
2 Watchers
9 Branches
7 Contributors
Updated on Jun 22, 2025
Latest Version
0.2.16
Package Id
jest-sonar@0.2.16
Unpacked Size
20.47 kB
Size
7.58 kB
File Count
19
NPM Version
8.11.0
Node Version
13.14.0
Published on
Apr 21, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
jest-sonar is a custom test reporter for Jest. It converts the generated report into Sonar's Generic Execution format.
Using yarn:
1$ yarn add -D jest-sonar
Using npm:
1$ npm i -D jest-sonar
Configure Jest in your jest.config
file and add jest-sonar
to the list of reporters.
1module.exports = { 2 ... 3 reporters: ['default', 'jest-sonar'], 4 ... 5} 6
The following options can be set to customize the reporter:
Option | Environment override | Description | Default | Accepted values |
---|---|---|---|---|
outputDirectory | JEST_SONAR_OUTPUT_DIR | The directory to which the report should be written | The projects root dir | string |
outputName | JEST_SONAR_OUTPUT_NAME | The name of the report | sonar-report.xml | string |
reportedFilePath | JEST_SONAR_REPORTED_FILE_PATH | Should the path be relative or absolute | 'relative' | 'relative' or 'absolute' |
relativeRootDir | JEST_SONAR_RELATIVE_ROOT_DIR | The root directory for the relative path | jest rootDir | string |
You can set these options when defining the reporter in jest.config
:
1module.exports = { 2 ... 3 reporters: ['default', ['jest-sonar', { 4 outputDirectory: 'my/custom/directory', 5 outputName: 'my-new-report-name.xml', 6 reportedFilePath: 'absolute' 7 }]], 8 ... 9} 10
Or you can override these options via environment variables. Environment variables will always take precedence over options set via jest.config
1$ JEST_SONAR_OUTPUT_DIR=./specialDir/ npm run jest
Contribution guidelines for this project
Contributions to this project are welcome, either by submitting bug reports, submitting feature requests or submitting pull requests.
NOTE: Be sure to merge the latest change from "upstream" before making a pull request!
This project uses the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 4/25 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More