Skip to content

Commit

Permalink
Format pending specs the same way as Mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
vassiliy committed Feb 16, 2017
1 parent 8ce610d commit 9160ea1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions index.js
Expand Up @@ -32,10 +32,19 @@ module.exports = function (spec) {
// Passing assertions
parser.on('pass', function (assertion) {

var glyph = format.green(symbols.tick);
var name = format.dim(assertion.name);
if (/# SKIP/.test(assertion.name)) {
var name = assertion.name.replace(' # SKIP', '')
name = format.cyan('- ' + name);

output.push(pad(' ' + name + '\n'));
}
else {
var glyph = format.green(symbols.tick);
var name = format.dim(assertion.name);

output.push(pad(' ' + glyph + ' ' + name + '\n'));
}

output.push(pad(' ' + glyph + ' ' + name + '\n'));
});

// Failing assertions
Expand Down

0 comments on commit 9160ea1

Please sign in to comment.