Skip to content

Commit

Permalink
Merge pull request #52 from souvikbasu/master
Browse files Browse the repository at this point in the history
Added support for windows platform to show tick mark and cross symbols
  • Loading branch information
bcaudan committed Jun 9, 2016
2 parents 5f49368 + c8caa10 commit 8108f0f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/processors/spec-prefixes-processor.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
var DisplayProcessor = require('../display-processor');

function SpecPrefixesProcessor(prefixes) {
var successSymbol = '✓ ',
failureSymbol = '✗ ',
pendingSymbol = '* ';

if (process && process.platform === 'win32') {
successSymbol = '\u221A ';
failureSymbol = '\u00D7 ';
pendingSymbol = '* ';
}

this.prefixes = {
success: prefixes && prefixes.success !== undefined ? prefixes.success : '✓ ',
failure: prefixes && prefixes.failure !== undefined ? prefixes.failure : '✗ ',
pending: prefixes && prefixes.pending !== undefined ? prefixes.pending : '* '
};
success: prefixes && prefixes.success !== undefined ? prefixes.success : successSymbol,
failure: prefixes && prefixes.failure !== undefined ? prefixes.failure : failureSymbol,
pending: prefixes && prefixes.pending !== undefined ? prefixes.pending : pendingSymbol
}
}

SpecPrefixesProcessor.prototype = new DisplayProcessor();
Expand Down

0 comments on commit 8108f0f

Please sign in to comment.