Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 361ae21

Browse files
committed
fix(plugins): add a 'test' or 'fail' string to plugins
Closes #1843
1 parent 3809426 commit 361ae21

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/plugins.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ var green = '\x1b[32m';
4444
var red = '\x1b[31m';
4545
var normalColor = '\x1b[39m';
4646

47+
var printResult = function(message, pass) {
48+
console.log(pass ? green : red, '\t', pass ? 'Pass: ' : 'Fail: ', message, normalColor);
49+
};
50+
4751
var noop = function() {};
4852

4953
function pluginFunFactory(funName) {
@@ -79,8 +83,8 @@ function pluginFunFactory(funName) {
7983
return x && y;
8084
}, true);
8185

82-
console.log(passed ? green : red, '\t' + specResult.description,
83-
normalColor);
86+
87+
printResult(specResult.description, passed);
8488
if (!passed) {
8589
for (var k = 0; k < specResult.assertions.length; k++) {
8690
if (!specResult.assertions[k].passed) {

0 commit comments

Comments
 (0)