Skip to content

Commit

Permalink
Merge pull request #2 from adamgruber/develop
Browse files Browse the repository at this point in the history
fix for local testing
  • Loading branch information
adamgruber committed Feb 11, 2015
2 parents 081c053 + e379603 commit d69ddc7
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mochawesome
===========
[![npm](http://img.shields.io/badge/npm-1.0.1-green.svg?style=flat-square)](http://registry.npm.wsjfdev.dowjones.net/mochawesome) [![Build Status](https://travis-ci.org/adamgruber/mochawesome.svg?branch=master)](https://travis-ci.org/adamgruber/mochawesome) [![Code Climate](https://codeclimate.com/github/adamgruber/mochawesome/badges/gpa.svg)](https://codeclimate.com/github/adamgruber/mochawesome)
[![npm](http://img.shields.io/badge/npm-1.0.2-green.svg?style=flat-square)](http://registry.npm.wsjfdev.dowjones.net/mochawesome) [![Build Status](https://travis-ci.org/adamgruber/mochawesome.svg?branch=master)](https://travis-ci.org/adamgruber/mochawesome) [![Code Climate](https://codeclimate.com/github/adamgruber/mochawesome/badges/gpa.svg)](https://codeclimate.com/github/adamgruber/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.

Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var gulp = require('gulp'),
config = require('./lib/config');

var mochaOpts = {
reporter: 'mochawesome',
reporter: path.join(__dirname, 'lib', 'mochawesome'),
timeout: 30000,
slow: 1,
'no-exit': true
Expand Down
File renamed without changes.
120 changes: 60 additions & 60 deletions lib/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,66 +17,6 @@ var Handlebars = require("handlebars");
+ 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)))
+ "</li>\n</ul>";
},"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 = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Mochawesome Report Card</title>\n <link rel=\"stylesheet\" href=\"css/mochawesome.css\">\n </head>\n <body>\n <!-- NAVBAR -->\n <div class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n <div class=\"container\">\n <div class=\"report-info-cnt\">\n <h1 class=\"report-title\">"
+ 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)))
+ "</h1>\n <h3 class=\"report-date\">"
+ 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})))
+ "</h3>\n </div>\n <div class=\"quick-summary-cnt\">\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 += " </div>\n </div>\n </div>\n\n <!-- Report Summary -->\n <div class=\"summary\">\n <div class=\"container\">\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 += " </div>\n </div>\n <div class=\"statusbar";
stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : helperMissing),(options={"name":"stats","hash":{},"fn":this.program(5, 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 <div class=\"container\">\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 += " </div>\n </div>\n\n <!-- Suites -->\n <div class=\"details container\">\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 + " </div>\n\n <footer>\n <div class=\"container\">\n <p>Report generated by <a href=\"https://github.dowjones.net/grubera/mochawesome\" target=\"_blank\">mochawesome</a>.<br>Designed and built by <a href=\"https://github.com/adamgruber\" target=\"_blank\">adamgruber</a>. &copy;2015.</p>\n </div>\n </footer>\n\n <!-- Scripts -->\n <script src=\"js/vendor.js\"></script>\n <script src=\"js/mochawesome.js\"></script>\n </body>\n</html>\n";
},"usePartial":true,"useData":true});
/*global Handlebars*/
var moment = require('moment');

Expand Down Expand Up @@ -155,6 +95,66 @@ Handlebars.registerHelper('dateFormat', function(context, format) {
return moment(context).format(format);
}
});
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 = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Mochawesome Report Card</title>\n <link rel=\"stylesheet\" href=\"css/mochawesome.css\">\n </head>\n <body>\n <!-- NAVBAR -->\n <div class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n <div class=\"container\">\n <div class=\"report-info-cnt\">\n <h1 class=\"report-title\">"
+ 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)))
+ "</h1>\n <h3 class=\"report-date\">"
+ 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})))
+ "</h3>\n </div>\n <div class=\"quick-summary-cnt\">\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 += " </div>\n </div>\n </div>\n\n <!-- Report Summary -->\n <div class=\"summary\">\n <div class=\"container\">\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 += " </div>\n </div>\n <div class=\"statusbar";
stack1 = ((helper = (helper = helpers.stats || (depth0 != null ? depth0.stats : depth0)) != null ? helper : helperMissing),(options={"name":"stats","hash":{},"fn":this.program(5, 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 <div class=\"container\">\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 += " </div>\n </div>\n\n <!-- Suites -->\n <div class=\"details container\">\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 + " </div>\n\n <footer>\n <div class=\"container\">\n <p>Report generated by <a href=\"https://github.dowjones.net/grubera/mochawesome\" target=\"_blank\">mochawesome</a>.<br>Designed and built by <a href=\"https://github.com/adamgruber\" target=\"_blank\">adamgruber</a>. &copy;2015.</p>\n </div>\n </footer>\n\n <!-- Scripts -->\n <script src=\"js/vendor.js\"></script>\n <script src=\"js/mochawesome.js\"></script>\n </body>\n</html>\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;
return " <div class=\"status-item status-item-hooks danger\">"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mochawesome",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Gorgeous HTML/CSS Reporter for Mocha.js",
"scripts": {
"test": "gulp build"
Expand Down

0 comments on commit d69ddc7

Please sign in to comment.