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

mochawesome-merge

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mochawesome-merge

Merge several Mochawesome JSON reports

  • 4.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
958K
decreased by-0.17%
Maintainers
1
Weekly downloads
 
Created

What is mochawesome-merge?

The 'mochawesome-merge' npm package is a utility that allows you to merge multiple Mochawesome JSON reports into a single JSON report. This is particularly useful when running tests in parallel or across different environments and you want to consolidate the results into one comprehensive report.

What are mochawesome-merge's main functionalities?

Merge Multiple Reports

This feature allows you to merge multiple Mochawesome JSON reports into a single JSON report. The code sample demonstrates how to use the 'mochawesome-merge' package to merge 'report1.json' and 'report2.json' into one consolidated report.

const merge = require('mochawesome-merge');
const options = { files: ['report1.json', 'report2.json'] };
merge(options).then(report => {
  console.log(report);
});

Custom Output File

This feature allows you to specify a custom output file for the merged report. The code sample demonstrates how to merge 'report1.json' and 'report2.json' and then write the merged report to 'merged-report.json'.

const merge = require('mochawesome-merge');
const fs = require('fs');
const options = { files: ['report1.json', 'report2.json'] };
merge(options).then(report => {
  fs.writeFileSync('merged-report.json', JSON.stringify(report));
});

Merge Reports with Custom Options

This feature allows you to merge reports with custom options such as specifying a custom directory and filename for the merged report. The code sample demonstrates how to use these custom options while merging 'report1.json' and 'report2.json'.

const merge = require('mochawesome-merge');
const options = { files: ['report1.json', 'report2.json'], reportDir: 'custom-dir', reportFilename: 'custom-report' };
merge(options).then(report => {
  console.log(report);
});

Other packages similar to mochawesome-merge

FAQs

Package last updated on 13 Mar 2023

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