- 
Merge Playwright HTML reports to a single HTML report
 - 
The
index.htmlfile is generated and other artifacts (screenshot, trace file etc) are copied from the source folders to the merged Report folder - 
Built on
node 14.18.1. - 
Note:
@playwright/testis a peer dependency, not a dev dependency. - 
Inspiration microsoft/playwright#10437
 
npm install playwright-merge-html-reports --dev- You will need to install 
@playwright/testpackage first (if not already done). - In your Node.js script
 
const { mergeHTMLReports } = require("playwright-merge-html-reports");inputReportPaths- Array of path to html report folders
mergeHTMLReports([
  process.cwd() + "/html_report-1",
  process.cwd() + "/html_report-2"
])config- Optional
const inputReportPaths = [
  process.cwd() + "/html_report-1",
  process.cwd() + "/html_report-2"
];
const config = {
  outputFolderName: "merged-html-report", // default value
  outputBasePath: process.cwd() // default value
}
mergeHTMLReports(inputReportPaths, config)- TS support
 - Uses 
jszipandyazlfor encoding and decoding zipped content from theindex.htmlfile. 
- Usage directly on Command line