nightwatch-html-reporter
Version:
Generates an HTML view of the Nightwatch.js test reports by either parsing the XML files generated by Nightwatch or by using the Nightwatch reporter options.
17 lines (12 loc) • 324 B
JavaScript
module.exports = function(opts) {
this.errmessages = [];
this.packages = [];
this.opts = opts;
this.isFailure = false;
this.addPackage = function(pkg) {
if (pkg.isFailure)
this.isFailure = true;
if (!opts.hideSuccess || (opts.hideSuccess && pkg.isFailure))
this.packages.push(pkg);
};
};