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

cypress-jest-coverage-merge

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-jest-coverage-merge

A helper to merge Cypress and Jest coverage reports into one report file.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
347
decreased by-33.65%
Maintainers
1
Weekly downloads
 
Created
Source

cypress-jest-coverage-merge

A helper to merge Cypress and Jest coverage reports into one report file.

This script is inspired by this example of merging Cypress & Jest reports: https://github.com/bahmutov/cypress-and-jest and https://github.com/transmissionsdev/merge-cypress-jest-coverag.

For better compatibility with multiple OS(Windows/Linux), this project uses nodejs APIs to handle files, such as copy/move/mkdir etc.

Usage

  1. Install
    npm i -D cypress-jest-coverage-merge
    
    Or
    yarn add -D cypress-jest-coverage-merge
    
  2. configure jest.config.js to set jest coverage report directory to tests/coverage/jest:
    ...
    // Indicates whether the coverage information should be collected while executing the test
    collectCoverage: true,
    // The directory where Jest should output its coverage files
    coverageDirectory: '<rootDir>/tests/coverage/jest',
    ...
    
  3. configure nyc in package.json to set Cypress coverage report directory to tests/coverage/cypress:
    ...
    "nyc": {
        "report-dir": "tests/coverage/cypress",
        "reporter": [
               "lcov",
               "json"
           ]
        }
    ...
    
  4. Run your Cypress tests and output coverage to a tests/coverage/cypress/ directory.
  5. Run your Jest tests and output coverage to a tests/coverage/jest directory.
  6. Run npx cypress-jest-coverage-merge and check the tests/coverage/reports directory for the merged report!

Keywords

FAQs

Package last updated on 04 Feb 2021

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