Socket
Book a DemoInstallSign in
Socket

jest-monocart-coverage

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-monocart-coverage

Jest Monocart Coverage Reports

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
0
Created
Source

jest-monocart-coverage

A Jest custom reporter for monocart coverage reports

Install

npm i jest-monocart-coverage

Usage

// jest.config.js
const config = {

    // Enable coverage
    collectCoverage: true,
    // Recommended to use `v8` to support the generation of native v8 coverage reports.
    coverageProvider: 'v8',
    // Monocart can also support all coverage reports, so there is no need to set up reports here.
    coverageReporters: ['none'],

    reporters: [
        // If custom reporters are specified, the default Jest reporter will be overridden. If you wish to keep it, 'default' must be passed as a reporters name:
        'default',

        // Monocart custom reporter to generate coverage reports. 
        ['jest-monocart-coverage', {
            name: 'My Unit Coverage Report',
            reports: [
                ['v8'],
                ['console-summary'],
                ['lcovonly']
            ],
            outputDir: './coverage-reports/unit'
        }]
    ]
    
};
export default config;

Check monocart coverage reports for more coverage options.

The Execution Order of Hooks

  • For Jest: custom reporter onEnd -> globalTeardown
  • For Playwright: globalTeardown -> coverage onEnd -> custom reporter onEnd

FAQs

Package last updated on 02 Jul 2024

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