UNPKG

html-reporter

Version:

Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.

28 lines 1.08 kB
'use strict'; const { commands } = require('..'); const { mergeReports } = require('../../merge-reports'); const { logError } = require('../../server-utils'); const { MERGE_REPORTS: commandName } = commands; module.exports = (program, toolAdapter) => { program .command(`${commandName} [paths...]`) .allowUnknownOption() .description('merge reports') .option('-d, --destination <destination>', 'path to directory with merged report', toolAdapter.reporterConfig.path) .option('-h, --header <header>', 'http header for databaseUrls.json files from source paths', collect, []) .action(async (paths, options) => { try { const { destination: destPath, header: headers } = options; await mergeReports(toolAdapter, paths, { destPath, headers }); process.exit(0); } catch (err) { logError(err); process.exit(1); } }); }; function collect(newValue, array = []) { return array.concat(newValue); } //# sourceMappingURL=merge-reports.js.map