From 51572cf92adcabbcd6493dfa5be5f2de80a7d8ac Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 08:49:49 -0400 Subject: [PATCH 1/6] add reportTitle option --- gulpfile.js | 8 ++++++++ lib/config.js | 1 + lib/mochawesome.js | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 6dcaac9..1f99c74 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -162,6 +162,14 @@ gulp.task('test', function () { .on('error', console.warn.bind(console)); }); +gulp.task('testOpts', function () { + mochaOpts.reporterOptions = 'reportDir=customDir,reportName=customName,reportTitle=customTitle'; + return gulp.src(testPaths.basic) + .pipe(mocha(mochaOpts)) + .on('error', console.warn.bind(console)); +}); + + // Default/Combo Tasks gulp.task('build', ['lint'], function () { return gulp.start('assemble'); diff --git a/lib/config.js b/lib/config.js index 87bd3b7..6cc3e8e 100644 --- a/lib/config.js +++ b/lib/config.js @@ -10,6 +10,7 @@ module.exports = function (options) { // Base Directories config.libDir = __dirname; config.reportDir = _getOption('reportDir', options); + config.reportTitle = _getOption('reportTitle', options); config.nodeModulesDir = path.join(__dirname, '..', 'node_modules'); // Build Directories diff --git a/lib/mochawesome.js b/lib/mochawesome.js index c4dd0cf..9ae5a48 100755 --- a/lib/mochawesome.js +++ b/lib/mochawesome.js @@ -75,7 +75,7 @@ function Mochawesome (runner, options) { traverseSuites(allSuites); var obj = { - reportTitle: process.cwd().split(config.splitChar).pop(), + reportTitle: config.reportTitle || process.cwd().split(config.splitChar).pop(), stats: self.stats, suites: allSuites, allTests: allTests.map(cleanTest), From a78b749db52de51921117865d31040016b44a4c9 Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 09:50:09 -0400 Subject: [PATCH 2/6] update docs --- README.md | 18 +++++++++++++----- changelog.md | 3 +++ package.json | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d3c9ec8..8f0183e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ mochawesome Mochawesome is a custom reporter for use with the Javascript testing framework, [mocha](http://visionmedia.github.io/mocha/). It generates a full fledged HTML/CSS report that helps visualize your test suites. -##New in 1.1.0 -- [Options](#options) support: change the location and/or filename for saved reports +##New in 1.2.0 +- New [Option](#options): change the report title in the output ##Features - At-a-glance stats including pass percentage @@ -17,6 +17,7 @@ Mochawesome is a custom reporter for use with the Javascript testing framework, - Stack trace for failed tests - Responsive and mobile-friendly - Saves JSON output for further processing +- Custom report [options](#options) - Offline viewing ##Browser Support @@ -82,7 +83,9 @@ The two main files to be aware of are: ##Options -Mochawesome supports options via environment variables or passed in to mocha via `--reporter-options`. You can change both the location where reports are saved and the filename of the report. *Setting a custom filename will change both the report html and json files.* +Mochawesome supports options via environment variables or passed in to mocha via `--reporter-options`. + +With options you can specify the location where reports are saved, the filename of the report and the title of the report in the html output. *Setting a custom filename will change both the report html and json files.* **Options passed in will take precedence over environment variables.** @@ -91,11 +94,12 @@ Mochawesome supports options via environment variables or passed in to mocha via ```bash $ export MOCHAWESOME_REPORTDIR=customReportDir $ export MOCHAWESOME_REPORTNAME=customReportName +$ export MOCHAWESOME_REPORTTITLE=customReportTitle ``` ####Mocha options ```bash -$ mocha test.js --reporter mochawesome --reporter-options reportDir=customReportDir,reportName=customReportName +$ mocha test.js --reporter mochawesome --reporter-options reportDir=customReportDir,reportName=customReportName,reportTitle=customReportTitle ``` ```js @@ -103,7 +107,8 @@ var mocha = new Mocha({ reporter: 'mochawesome', reporterOptions: { reportDir: 'customReportDir', - reportName: 'customReportName' + reportName: 'customReportName', + reportTitle: 'customReportTitle' } }); ``` @@ -136,3 +141,6 @@ This will run jshint only, no building will occur. ####`gulp test` - Run Test After building you can run this to test the reporter and see the output. *Note: The default gulp task will run this task.* + +####`gulp testOpts` - Run Test with Options +After building you can run this to test the reporter and see the output. \ No newline at end of file diff --git a/changelog.md b/changelog.md index c67937d..428bf9f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ #Changelog +###1.2.0 +- Enhancement: custom report title option. Closes [#11](https://github.com/adamgruber/mochawesome/issues/11) + ###1.1.2 - Fixes [#10](https://github.com/adamgruber/mochawesome/issues/10) diff --git a/package.json b/package.json index 82254b1..d93d7aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mochawesome", - "version": "1.1.2", + "version": "1.2.0", "description": "A Gorgeous HTML/CSS Reporter for Mocha.js", "scripts": { "test": "gulp build" From c4261347d7d5b99a0ef0c5956747ab8ccd8d4ca1 Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 13:40:25 -0400 Subject: [PATCH 3/6] update handlebars version; add preventIndent option --- gulpfile.js | 5 +- lib/templates.js | 448 ++++++++++++++++++++++++----------------------- package.json | 2 +- 3 files changed, 234 insertions(+), 221 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6dcaac9..e19e9d9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -98,7 +98,10 @@ gulp.task('clientScripts', ['lint'], function () { gulp.task('templates', function () { var partials = gulp.src(path.join(config.srcHbsDir, '_*.mu')) .pipe(handlebars({ - handlebars: require('handlebars') + handlebars: require('handlebars'), + compilerOptions: { + preventIndent: true + } })) .pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, Handlebars.template(<%= contents %>));', {}, { imports: { diff --git a/lib/templates.js b/lib/templates.js index 1c447f5..9d9c72b 100644 --- a/lib/templates.js +++ b/lib/templates.js @@ -1,82 +1,23 @@ var Handlebars = require("handlebars"); Handlebars.registerPartial("_quickSummary", Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var helper, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, functionType="function"; + var helper, alias1=helpers.helperMissing, alias2=this.escapeExpression, alias3="function"; + return "
    \n
  • " - + escapeExpression(((helpers.formatSummaryDuration || (depth0 && depth0.formatSummaryDuration) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"formatSummaryDuration","hash":{},"data":data}))) + + alias2((helpers.formatSummaryDuration || (depth0 && depth0.formatSummaryDuration) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"formatSummaryDuration","hash":{},"data":data})) + "" - + escapeExpression(((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"getSummaryDurationUnits","hash":{},"data":data}))) + + alias2((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"getSummaryDurationUnits","hash":{},"data":data})) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"suites","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"suites","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.testsRegistered || (depth0 != null ? depth0.testsRegistered : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"testsRegistered","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.testsRegistered || (depth0 != null ? depth0.testsRegistered : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"testsRegistered","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.passes || (depth0 != null ? depth0.passes : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"passes","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.passes || (depth0 != null ? depth0.passes : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"passes","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.failures || (depth0 != null ? depth0.failures : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"failures","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.failures || (depth0 != null ? depth0.failures : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"failures","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pending","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"pending","hash":{},"data":data}) : helper))) + "
  • \n
"; },"useData":true})); -exports["mochawesome"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._quickSummary, ' ', '_quickSummary', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"3":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._summary, ' ', '_summary', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"5":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, blockHelperMissing=helpers.blockHelperMissing, buffer = ""; - stack1 = ((helper = (helper = helpers.hasOther || (depth0 != null ? depth0.hasOther : depth0)) != null ? helper : helperMissing),(options={"name":"hasOther","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.hasOther) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.hasSkipped || (depth0 != null ? depth0.hasSkipped : depth0)) != null ? helper : helperMissing),(options={"name":"hasSkipped","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.hasSkipped) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - return buffer; -},"6":function(depth0,helpers,partials,data) { - return " has-failed-hooks"; - },"8":function(depth0,helpers,partials,data) { - return " has-skipped-tests"; - },"10":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._statusbar, ' ', '_statusbar', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"12":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._suite, ' ', '_suite', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n\n \n \n \n \n Mochawesome Report Card\n \n \n \n \n
\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.reportTitle || (depth0 != null ? depth0.reportTitle : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"reportTitle","hash":{},"data":data}) : helper))) - + "

\n

" - + escapeExpression(((helpers.dateFormat || (depth0 && depth0.dateFormat) || helperMissing).call(depth0, ((stack1 = (depth0 != null ? depth0.stats : depth0)) != null ? stack1.end : stack1), "dddd, MMMM D YYYY, hh:mma", {"name":"dateFormat","hash":{},"data":data}))) - + "

\n
\n
\n"; - stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : helperMissing),(options={"name":"stats","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.stats) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += "
\n
\n
\n\n \n
\n
\n"; - stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : helperMissing),(options={"name":"stats","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.stats) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += "
\n
\n
\n
\n"; - stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : helperMissing),(options={"name":"stats","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.stats) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += "
\n
\n\n \n
\n"; - stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helperMissing),(options={"name":"suites","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.suites) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - return buffer + "
\n\n \n\n \n \n \n \n\n"; -},"usePartial":true,"useData":true}); /*global Handlebars*/ var moment = require('moment'); @@ -155,246 +96,315 @@ Handlebars.registerHelper('dateFormat', function(context, format) { return moment(context).format(format); } }); +exports["mochawesome"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = this.invokePartial(partials._quickSummary,depth0,{"name":"_quickSummary","data":data,"indent":" ","helpers":helpers,"partials":partials})) != null ? stack1 : ""); +},"3":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = this.invokePartial(partials._summary,depth0,{"name":"_summary","data":data,"indent":" ","helpers":helpers,"partials":partials})) != null ? stack1 : ""); +},"5":function(depth0,helpers,partials,data) { + var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=helpers.blockHelperMissing, buffer = ""; + + stack1 = ((helper = (helper = helpers.hasOther || (depth0 != null ? depth0.hasOther : depth0)) != null ? helper : alias1),(options={"name":"hasOther","hash":{},"fn":this.program(6, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasOther) { stack1 = alias3.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + stack1 = ((helper = (helper = helpers.hasSkipped || (depth0 != null ? depth0.hasSkipped : depth0)) != null ? helper : alias1),(options={"name":"hasSkipped","hash":{},"fn":this.program(8, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasSkipped) { stack1 = alias3.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + return buffer; +},"6":function(depth0,helpers,partials,data) { + return " has-failed-hooks"; +},"8":function(depth0,helpers,partials,data) { + return " has-skipped-tests"; +},"10":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = this.invokePartial(partials._statusbar,depth0,{"name":"_statusbar","data":data,"indent":" ","helpers":helpers,"partials":partials})) != null ? stack1 : ""); +},"12":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = this.invokePartial(partials._suite,depth0,{"name":"_suite","data":data,"indent":" ","helpers":helpers,"partials":partials})) != null ? stack1 : ""); +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression, alias4=helpers.blockHelperMissing, buffer = + "\n\n \n \n \n \n Mochawesome Report Card\n \n \n \n \n
\n
\n
\n

" + + alias3(((helper = (helper = helpers.reportTitle || (depth0 != null ? depth0.reportTitle : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"reportTitle","hash":{},"data":data}) : helper))) + + "

\n

" + + alias3((helpers.dateFormat || (depth0 && depth0.dateFormat) || alias1).call(depth0,((stack1 = (depth0 != null ? depth0.stats : depth0)) != null ? stack1.end : stack1),"dddd, MMMM D YYYY, hh:mma",{"name":"dateFormat","hash":{},"data":data})) + + "

\n
\n
\n"; + stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : alias1),(options={"name":"stats","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.stats) { stack1 = alias4.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + buffer += "
\n
\n
\n\n \n
\n
\n"; + stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : alias1),(options={"name":"stats","hash":{},"fn":this.program(3, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.stats) { stack1 = alias4.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + buffer += "
\n
\n
\n
\n"; + stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : alias1),(options={"name":"stats","hash":{},"fn":this.program(10, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.stats) { stack1 = alias4.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + buffer += "
\n
\n\n \n
\n"; + stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : alias1),(options={"name":"suites","hash":{},"fn":this.program(12, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.suites) { stack1 = alias4.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + return buffer + "
\n\n \n\n \n \n \n \n\n"; +},"usePartial":true,"useData":true}); Handlebars.registerPartial("_statusbar", Handlebars.template({"1":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + var helper, alias1=helpers.helperMissing, alias2=this.escapeExpression; + return "
" - + escapeExpression(((helper = (helper = helpers.other || (depth0 != null ? depth0.other : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"other","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.other || (depth0 != null ? depth0.other : depth0)) != null ? helper : alias1),(typeof helper === "function" ? helper.call(depth0,{"name":"other","hash":{},"data":data}) : helper))) + " Failed Hook" - + escapeExpression(((helpers.getPlural || (depth0 && depth0.getPlural) || helperMissing).call(depth0, (depth0 != null ? depth0.other : depth0), {"name":"getPlural","hash":{},"data":data}))) + + alias2((helpers.getPlural || (depth0 && depth0.getPlural) || alias1).call(depth0,(depth0 != null ? depth0.other : depth0),{"name":"getPlural","hash":{},"data":data})) + "
\n"; },"3":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + var helper, alias1=helpers.helperMissing, alias2=this.escapeExpression; + return "
" - + escapeExpression(((helper = (helper = helpers.skipped || (depth0 != null ? depth0.skipped : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"skipped","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.skipped || (depth0 != null ? depth0.skipped : depth0)) != null ? helper : alias1),(typeof helper === "function" ? helper.call(depth0,{"name":"skipped","hash":{},"data":data}) : helper))) + " Skipped Test" - + escapeExpression(((helpers.getPlural || (depth0 && depth0.getPlural) || helperMissing).call(depth0, (depth0 != null ? depth0.skipped : depth0), {"name":"getPlural","hash":{},"data":data}))) + + alias2((helpers.getPlural || (depth0 && depth0.getPlural) || alias1).call(depth0,(depth0 != null ? depth0.skipped : depth0),{"name":"getPlural","hash":{},"data":data})) + "
\n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression, buffer = "
\n"; - stack1 = ((helper = (helper = helpers.hasOther || (depth0 != null ? depth0.hasOther : depth0)) != null ? helper : helperMissing),(options={"name":"hasOther","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.hasOther) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=helpers.blockHelperMissing, alias4=this.escapeExpression, buffer = + "
\n"; + stack1 = ((helper = (helper = helpers.hasOther || (depth0 != null ? depth0.hasOther : depth0)) != null ? helper : alias1),(options={"name":"hasOther","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasOther) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.hasSkipped || (depth0 != null ? depth0.hasSkipped : depth0)) != null ? helper : helperMissing),(options={"name":"hasSkipped","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.hasSkipped) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.hasSkipped || (depth0 != null ? depth0.hasSkipped : depth0)) != null ? helper : alias1),(options={"name":"hasSkipped","hash":{},"fn":this.program(3, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasSkipped) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer + "
" - + escapeExpression(((helper = (helper = helpers.pendingPercent || (depth0 != null ? depth0.pendingPercent : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pendingPercent","hash":{},"data":data}) : helper))) + + alias4(((helper = (helper = helpers.pendingPercent || (depth0 != null ? depth0.pendingPercent : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pendingPercent","hash":{},"data":data}) : helper))) + "% Pending
\n
" - + escapeExpression(((helper = (helper = helpers.passPercent || (depth0 != null ? depth0.passPercent : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"passPercent","hash":{},"data":data}) : helper))) + + alias4(((helper = (helper = helpers.passPercent || (depth0 != null ? depth0.passPercent : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"passPercent","hash":{},"data":data}) : helper))) + "% Passing
\n
"; },"useData":true})); Handlebars.registerPartial("_suite", Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, blockHelperMissing=helpers.blockHelperMissing, buffer = ""; - stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helperMissing),(options={"name":"suites","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.suites) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + var stack1, helper, options, buffer = ""; + + stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"suites","hash":{},"fn":this.program(2, data, 0),"inverse":this.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0,options) : helper)); + if (!helpers.suites) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer; },"2":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._suite, ' ', '_suite', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; + var stack1; + + return " " + + ((stack1 = this.invokePartial(partials._suite,depth0,{"name":"_suite","data":data,"helpers":helpers,"partials":partials})) != null ? stack1 : ""); },"4":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "
\n
\n
\n

"; - stack1 = ((helpers.isBlank || (depth0 && depth0.isBlank) || helperMissing).call(depth0, (depth0 != null ? depth0.title : depth0), {"name":"isBlank","hash":{},"fn":this.program(19, data),"inverse":this.program(21, data),"data":data})); + stack1 = ((helper = (helper = helpers.hasPending || (depth0 != null ? depth0.hasPending : depth0)) != null ? helper : alias1),(options={"name":"hasPending","hash":{},"fn":this.program(15, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasPending) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } - buffer += "

\n
"; - stack1 = ((helpers.isBlank || (depth0 && depth0.isBlank) || helperMissing).call(depth0, (depth0 != null ? depth0.file : depth0), {"name":"isBlank","hash":{},"fn":this.program(19, data),"inverse":this.program(23, data),"data":data})); + stack1 = ((helper = (helper = helpers.hasSkipped || (depth0 != null ? depth0.hasSkipped : depth0)) != null ? helper : alias1),(options={"name":"hasSkipped","hash":{},"fn":this.program(17, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasSkipped) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } - buffer += "
\n"; - stack1 = ((helper = (helper = helpers.hasTests || (depth0 != null ? depth0.hasTests : depth0)) != null ? helper : helperMissing),(options={"name":"hasTests","hash":{},"fn":this.program(25, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.hasTests) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + buffer += "\">\n

" + + ((stack1 = (helpers.isBlank || (depth0 && depth0.isBlank) || alias1).call(depth0,(depth0 != null ? depth0.title : depth0),{"name":"isBlank","hash":{},"fn":this.program(19, data, 0),"inverse":this.program(21, data, 0),"data":data})) != null ? stack1 : "") + + "

\n
" + + ((stack1 = (helpers.isBlank || (depth0 && depth0.isBlank) || alias1).call(depth0,(depth0 != null ? depth0.file : depth0),{"name":"isBlank","hash":{},"fn":this.program(19, data, 0),"inverse":this.program(23, data, 0),"data":data})) != null ? stack1 : "") + + "
\n"; + stack1 = ((helper = (helper = helpers.hasTests || (depth0 != null ? depth0.hasTests : depth0)) != null ? helper : alias1),(options={"name":"hasTests","hash":{},"fn":this.program(25, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.hasTests) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } buffer += "\n"; - stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helperMissing),(options={"name":"suites","hash":{},"fn":this.program(28, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.suites) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : alias1),(options={"name":"suites","hash":{},"fn":this.program(28, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.suites) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer + "\n
\n
\n"; },"5":function(depth0,helpers,partials,data) { - return " root-suite"; - },"7":function(depth0,helpers,partials,data) { - return " has-suites"; - },"9":function(depth0,helpers,partials,data) { - return " has-tests"; - },"11":function(depth0,helpers,partials,data) { - return " has-passed"; - },"13":function(depth0,helpers,partials,data) { - return " has-failed"; - },"15":function(depth0,helpers,partials,data) { - return " has-pending"; - },"17":function(depth0,helpers,partials,data) { - return " has-skipped"; - },"19":function(depth0,helpers,partials,data) { - return " "; - },"21":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"title","hash":{},"data":data}) : helper))); - },"23":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return escapeExpression(((helper = (helper = helpers.file || (depth0 != null ? depth0.file : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"file","hash":{},"data":data}) : helper))); - },"25":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = " \n
\n \n
\n \n
\n
\n \n
    \n
  • " - + escapeExpression(((helpers.formatDuration || (depth0 && depth0.formatDuration) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"formatDuration","hash":{},"data":data}))) + + alias3((helpers.formatDuration || (depth0 && depth0.formatDuration) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"formatDuration","hash":{},"data":data})) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.totalTests || (depth0 != null ? depth0.totalTests : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"totalTests","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.totalTests || (depth0 != null ? depth0.totalTests : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"totalTests","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.totalPasses || (depth0 != null ? depth0.totalPasses : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"totalPasses","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.totalPasses || (depth0 != null ? depth0.totalPasses : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"totalPasses","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.totalFailures || (depth0 != null ? depth0.totalFailures : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"totalFailures","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.totalFailures || (depth0 != null ? depth0.totalFailures : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"totalFailures","hash":{},"data":data}) : helper))) + "
  • \n
  • " - + escapeExpression(((helper = (helper = helpers.totalPending || (depth0 != null ? depth0.totalPending : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"totalPending","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.totalPending || (depth0 != null ? depth0.totalPending : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"totalPending","hash":{},"data":data}) : helper))) + "
  • \n
\n \n
\n
\n

Tests

\n
\n
\n"; - stack1 = ((helper = (helper = helpers.tests || (depth0 != null ? depth0.tests : depth0)) != null ? helper : helperMissing),(options={"name":"tests","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.tests) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.tests || (depth0 != null ? depth0.tests : depth0)) != null ? helper : alias1),(options={"name":"tests","hash":{},"fn":this.program(26, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.tests) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer + "
\n
\n
\n"; },"26":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._test, ' ', '_test', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; + var stack1; + + return " " + + ((stack1 = this.invokePartial(partials._test,depth0,{"name":"_test","data":data,"helpers":helpers,"partials":partials})) != null ? stack1 : ""); },"28":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = this.invokePartial(partials._suite, ' ', '_suite', depth0, undefined, helpers, partials, data); - if (stack1 != null) { buffer += stack1; } - return buffer; + var stack1; + + return " " + + ((stack1 = this.invokePartial(partials._suite,depth0,{"name":"_suite","data":data,"helpers":helpers,"partials":partials})) != null ? stack1 : ""); },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, blockHelperMissing=helpers.blockHelperMissing, buffer = ""; - stack1 = ((helper = (helper = helpers.rootEmpty || (depth0 != null ? depth0.rootEmpty : depth0)) != null ? helper : helperMissing),(options={"name":"rootEmpty","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.rootEmpty) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=helpers.blockHelperMissing, buffer = ""; + + stack1 = ((helper = (helper = helpers.rootEmpty || (depth0 != null ? depth0.rootEmpty : depth0)) != null ? helper : alias1),(options={"name":"rootEmpty","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.rootEmpty) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.rootEmpty || (depth0 != null ? depth0.rootEmpty : depth0)) != null ? helper : helperMissing),(options={"name":"rootEmpty","hash":{},"fn":this.noop,"inverse":this.program(4, data),"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.rootEmpty) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.rootEmpty || (depth0 != null ? depth0.rootEmpty : depth0)) != null ? helper : alias1),(options={"name":"rootEmpty","hash":{},"fn":this.noop,"inverse":this.program(4, data, 0),"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.rootEmpty) { stack1 = alias3.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer; },"usePartial":true,"useData":true})); Handlebars.registerPartial("_summary", Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var helper, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, functionType="function"; + var helper, alias1=helpers.helperMissing, alias2=this.escapeExpression, alias3="function"; + return "
\n
\n

" - + escapeExpression(((helpers.formatSummaryDuration || (depth0 && depth0.formatSummaryDuration) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"formatSummaryDuration","hash":{},"data":data}))) + + alias2((helpers.formatSummaryDuration || (depth0 && depth0.formatSummaryDuration) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"formatSummaryDuration","hash":{},"data":data})) + "" - + escapeExpression(((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"getSummaryDurationUnits","hash":{},"data":data}))) + + alias2((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"getSummaryDurationUnits","hash":{},"data":data})) + "

\n

" - + escapeExpression(((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"getSummaryDurationUnits","hash":{},"data":data}))) + + alias2((helpers.getSummaryDurationUnits || (depth0 && depth0.getSummaryDurationUnits) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"getSummaryDurationUnits","hash":{},"data":data})) + "

\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"suites","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.suites || (depth0 != null ? depth0.suites : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"suites","hash":{},"data":data}) : helper))) + "

\n

Suite" - + escapeExpression(((helpers.getPlural || (depth0 && depth0.getPlural) || helperMissing).call(depth0, (depth0 != null ? depth0.suites : depth0), {"name":"getPlural","hash":{},"data":data}))) + + alias2((helpers.getPlural || (depth0 && depth0.getPlural) || alias1).call(depth0,(depth0 != null ? depth0.suites : depth0),{"name":"getPlural","hash":{},"data":data})) + "

\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.testsRegistered || (depth0 != null ? depth0.testsRegistered : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"testsRegistered","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.testsRegistered || (depth0 != null ? depth0.testsRegistered : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"testsRegistered","hash":{},"data":data}) : helper))) + "

\n

Test" - + escapeExpression(((helpers.getPlural || (depth0 && depth0.getPlural) || helperMissing).call(depth0, (depth0 != null ? depth0.testsRegistered : depth0), {"name":"getPlural","hash":{},"data":data}))) + + alias2((helpers.getPlural || (depth0 && depth0.getPlural) || alias1).call(depth0,(depth0 != null ? depth0.testsRegistered : depth0),{"name":"getPlural","hash":{},"data":data})) + "

\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.passes || (depth0 != null ? depth0.passes : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"passes","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.passes || (depth0 != null ? depth0.passes : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"passes","hash":{},"data":data}) : helper))) + "

\n

Passed

\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.failures || (depth0 != null ? depth0.failures : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"failures","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.failures || (depth0 != null ? depth0.failures : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"failures","hash":{},"data":data}) : helper))) + "

\n

Failed

\n
\n
\n

" - + escapeExpression(((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pending","hash":{},"data":data}) : helper))) + + alias2(((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : alias1),(typeof helper === alias3 ? helper.call(depth0,{"name":"pending","hash":{},"data":data}) : helper))) + "

\n

Pending

\n
\n
"; },"useData":true})); Handlebars.registerPartial("_test", Handlebars.template({"1":function(depth0,helpers,partials,data) { - return " passed"; - },"3":function(depth0,helpers,partials,data) { - return " failed"; - },"5":function(depth0,helpers,partials,data) { - return " pending"; - },"7":function(depth0,helpers,partials,data) { - return " skipped"; - },"9":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " passed"; +},"3":function(depth0,helpers,partials,data) { + return " failed"; +},"5":function(depth0,helpers,partials,data) { + return " pending"; +},"7":function(depth0,helpers,partials,data) { + return " skipped"; +},"9":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + return "
\n \n " - + escapeExpression(((helpers.formatDuration || (depth0 && depth0.formatDuration) || helperMissing).call(depth0, (depth0 != null ? depth0.duration : depth0), {"name":"formatDuration","hash":{},"data":data}))) + + alias3((helpers.formatDuration || (depth0 && depth0.formatDuration) || alias1).call(depth0,(depth0 != null ? depth0.duration : depth0),{"name":"formatDuration","hash":{},"data":data})) + "\n
\n"; -},"11":function(depth0,helpers,partials,data,depths) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, lambda=this.lambda; +},"11":function(depth0,helpers,partials,data,blockParams,depths) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + return "

" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper))) + ": " - + escapeExpression(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"message","hash":{},"data":data}) : helper))) + "\n \n

\n"; },"13":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + var helper; + return "
\n
"
-    + escapeExpression(((helper = (helper = helpers.stack || (depth0 != null ? depth0.stack : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"stack","hash":{},"data":data}) : helper)))
+    + this.escapeExpression(((helper = (helper = helpers.stack || (depth0 != null ? depth0.stack : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"stack","hash":{},"data":data}) : helper)))
     + "
\n
\n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data,depths) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "
= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data,blockParams,depths) { + var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression, alias4=helpers.blockHelperMissing, buffer = + "
\n \n
\n

\n it \n " - + escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"title","hash":{},"data":data}) : helper))) + + alias3(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"title","hash":{},"data":data}) : helper))) + "\n

\n"; - stack1 = ((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : helperMissing),(options={"name":"pending","hash":{},"fn":this.noop,"inverse":this.program(9, data, depths),"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.pending) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.pending || (depth0 != null ? depth0.pending : depth0)) != null ? helper : alias1),(options={"name":"pending","hash":{},"fn":this.noop,"inverse":this.program(9, data, 0, blockParams, depths),"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.pending) { stack1 = alias4.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } buffer += "
\n \n"; - stack1 = ((helper = (helper = helpers.err || (depth0 != null ? depth0.err : depth0)) != null ? helper : helperMissing),(options={"name":"err","hash":{},"fn":this.program(11, data, depths),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.err) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += " \n
\n
";
-  stack1 = ((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper));
-  if (stack1 != null) { buffer += stack1; }
-  buffer += "
\n
\n \n"; - stack1 = ((helper = (helper = helpers.err || (depth0 != null ? depth0.err : depth0)) != null ? helper : helperMissing),(options={"name":"err","hash":{},"fn":this.program(13, data, depths),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.err) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + stack1 = ((helper = (helper = helpers.err || (depth0 != null ? depth0.err : depth0)) != null ? helper : alias1),(options={"name":"err","hash":{},"fn":this.program(11, data, 0, blockParams, depths),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.err) { stack1 = alias4.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + buffer += " \n
\n
"
+    + ((stack1 = ((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"code","hash":{},"data":data}) : helper))) != null ? stack1 : "")
+    + "
\n
\n \n"; + stack1 = ((helper = (helper = helpers.err || (depth0 != null ? depth0.err : depth0)) != null ? helper : alias1),(options={"name":"err","hash":{},"fn":this.program(13, data, 0, blockParams, depths),"inverse":this.noop,"data":data}),(typeof helper === alias2 ? helper.call(depth0,options) : helper)); + if (!helpers.err) { stack1 = alias4.call(depth0,stack1,options)} if (stack1 != null) { buffer += stack1; } return buffer + "
"; },"useData":true,"useDepths":true})); \ No newline at end of file diff --git a/package.json b/package.json index 82254b1..9809e4c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "dependencies": { "async": "^0.9.0", "chalk": "^1.0.0", - "handlebars": "^2.0.0", + "handlebars": "^3.0.3", "highlight.js": "^8.4.0", "json-stringify-safe": "^5.0.0", "lodash": "^3.1.0", From 9def4c4228ba4e596d0ff37b3860a515d5aef8c7 Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 23:55:21 -0400 Subject: [PATCH 4/6] update deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 09055b8..42a08b0 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "async": "^0.9.0", "chalk": "^1.0.0", "handlebars": "^3.0.3", - "highlight.js": "^8.4.0", + "highlight.js": "^8.5.0", "json-stringify-safe": "^5.0.0", "lodash": "^3.1.0", "mocha": "*", @@ -38,7 +38,7 @@ "gulp": "^3.8.1", "gulp-concat": "^2.4.3", "gulp-declare": "^0.3.0", - "gulp-handlebars": "^3.0.1", + "gulp-handlebars": "^4.0.0", "gulp-jshint": "^1.9.0", "gulp-less": "^3.0.3", "gulp-plumber": "^0.6.6", From bee80bb7bd09cbf3b9679df531eef3daa7f083a9 Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 23:56:01 -0400 Subject: [PATCH 5/6] add highlighting to stack tracke; fix code indentation --- lib/mochawesome.js | 11 ++++++++++- lib/templates.js | 4 ++-- src/templates/_test.mu | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/mochawesome.js b/lib/mochawesome.js index 9ae5a48..6dd1ed3 100755 --- a/lib/mochawesome.js +++ b/lib/mochawesome.js @@ -15,6 +15,11 @@ var Base = mocha.reporters.Base, var totalTestsRegistered = 0; +Highlight.configure({ + useBR: true, + languages: ['javascript'] +}); + module.exports = Mochawesome; /** @@ -236,7 +241,11 @@ function cleanTest (test) { err = test.err ? _.pick( test.err, ['name', 'message', 'stack'] ) : test.err; if(test.fn){ code = cleanCode(test.fn.toString()); - code = Highlight.highlightAuto(code, ['javascript']).value; + code = Highlight.fixMarkup(Highlight.highlightAuto(code).value); + } + + if(err && err.stack){ + err.stack = Highlight.fixMarkup(Highlight.highlightAuto(err.stack).value); } var cleaned = { diff --git a/lib/templates.js b/lib/templates.js index 9d9c72b..c6fc084 100644 --- a/lib/templates.js +++ b/lib/templates.js @@ -368,10 +368,10 @@ Handlebars.registerPartial("_test", Handlebars.template({"1":function(depth0,hel + alias3(this.lambda((depths[1] != null ? depths[1].uuid : depths[1]), depth0)) + " > .test-error-stack.collapse\">Stack\n

\n"; },"13":function(depth0,helpers,partials,data) { - var helper; + var stack1, helper; return "
\n
"
-    + this.escapeExpression(((helper = (helper = helpers.stack || (depth0 != null ? depth0.stack : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"stack","hash":{},"data":data}) : helper)))
+    + ((stack1 = ((helper = (helper = helpers.stack || (depth0 != null ? depth0.stack : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"stack","hash":{},"data":data}) : helper))) != null ? stack1 : "")
     + "
\n
\n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data,blockParams,depths) { var stack1, helper, options, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression, alias4=helpers.blockHelperMissing, buffer = diff --git a/src/templates/_test.mu b/src/templates/_test.mu index ac2ed18..4bb0cc4 100644 --- a/src/templates/_test.mu +++ b/src/templates/_test.mu @@ -25,7 +25,7 @@ {{#err}}
-
{{stack}}
+
{{{stack}}}
{{/err}}
\ No newline at end of file From ff019a2ea385f097a75783b78f85494e82d9cb3a Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Sat, 16 May 2015 23:57:22 -0400 Subject: [PATCH 6/6] update changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 428bf9f..1f7cfbf 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ###1.2.0 - Enhancement: custom report title option. Closes [#11](https://github.com/adamgruber/mochawesome/issues/11) +- Fixed indentation in code block and stack traces ###1.1.2 - Fixes [#10](https://github.com/adamgruber/mochawesome/issues/10)