Skip to content

Commit

Permalink
fix(plugins): add a 'test' or 'fail' string to plugins
Browse files Browse the repository at this point in the history
Closes #1843
  • Loading branch information
juliemr committed Feb 23, 2015
1 parent 3809426 commit 361ae21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/plugins.js
Expand Up @@ -44,6 +44,10 @@ var green = '\x1b[32m';
var red = '\x1b[31m';
var normalColor = '\x1b[39m';

var printResult = function(message, pass) {
console.log(pass ? green : red, '\t', pass ? 'Pass: ' : 'Fail: ', message, normalColor);
};

var noop = function() {};

function pluginFunFactory(funName) {
Expand Down Expand Up @@ -79,8 +83,8 @@ function pluginFunFactory(funName) {
return x && y;
}, true);

console.log(passed ? green : red, '\t' + specResult.description,
normalColor);

printResult(specResult.description, passed);
if (!passed) {
for (var k = 0; k < specResult.assertions.length; k++) {
if (!specResult.assertions[k].passed) {
Expand Down

0 comments on commit 361ae21

Please sign in to comment.