Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fr0stf0x/jest-sonar

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fr0stf0x/jest-sonar

A sonar reporter for jest

  • 0.2.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

jest-sonar

jest-sonar is a custom test reporter for Jest. It converts the generated report into Sonar's Generic Execution format.

CodeQL Maintainability Test Coverage

Installation

Using yarn:

$ yarn install -D jest-sonar

Using npm:

$ npm i -D jest-sonar

Configuration

Configure Jest in your jest.config file and add jest-sonar to the list of reporters.

module.exports = {
    ...
    reporters: ['default',  'jest-sonar'],
    ...
}

Customize the reporter

The following options can be set to customize the reporter:

OptionDescriptionDefaultAccepted values
outputDirectoryThe directory to which the report should be writtenThe projects root dirstring
outputNameThe name of the reportsonar-report.xmlstring
reportedFilePathShould the path be relative or absolute'relative''relative' or 'absolute'
relativeRootDirThe root directory for the relative pathjest rootDirstring

You can set these options when defining the reporter in jest.config:

module.exports = {
    ...
        reporters: ['default',  ['jest-sonar', {
            outputDirectory: 'my/custom/directory',
            outputName: 'my-new-report-name.xml',
            reportedFilePath: 'absolute'
        }]],
    ...
}

Contribution

Contribution guidelines for this project

Contributions to this project are welcome, either by submitting bug reports, submitting feature requests or submitting pull requests.

Creating a pull request

  1. Fork the repo on GitHub
  2. Clone and make changes on your machine
  3. Commit and Push the changes to your fork
  4. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest change from "upstream" before making a pull request!

Licence

This project uses the MIT license.

Keywords

FAQs

Package last updated on 24 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc