Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/reporters/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ exports.run = function (files, options, callback) {
var assertion_message = function (str) {
return options.assertion_prefix + str + options.assertion_suffix;
};
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔';
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖';

var start = new Date().getTime();
var tracker = track.createTracker(function (tracker) {
Expand Down Expand Up @@ -80,10 +82,10 @@ exports.run = function (files, options, callback) {
tracker.remove(name);

if (!assertions.failures()) {
console.log('✔ ' + name);
console.log(pass_indicator + ' ' + name);
}
else {
console.log(error('✖ ' + name) + '\n');
console.log(error(fail_indicator + ' ' + name) + '\n');
assertions.forEach(function (a) {
if (a.failed()) {
a = utils.betterErrors(a);
Expand Down
3 changes: 2 additions & 1 deletion lib/reporters/nested.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports.run = function (files, options, callback) {
var assertion_message = function (str) {
return options.assertion_prefix + str + options.assertion_suffix;
};
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖';

var spaces_per_indent = options.spaces_per_indent || 4;

Expand Down Expand Up @@ -86,7 +87,7 @@ exports.run = function (files, options, callback) {
};

var fail_text = function (txt) {
return bold(error(txt + " (fail) "));
return bold(error(txt + " (fail) " + fail_indicator + " "));
};

var status_text = function (txt, status) {
Expand Down
8 changes: 5 additions & 3 deletions lib/reporters/skip_passed.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ exports.run = function (files, options, callback) {
var assertion_message = function (str) {
return options.assertion_prefix + str + options.assertion_suffix;
};
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔';
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖';

var start = new Date().getTime();
var paths = files.map(function (p) {
Expand All @@ -63,7 +65,7 @@ exports.run = function (files, options, callback) {
},
testDone: function (name, assertions) {
if (assertions.failures()) {
console.log(error('✖ ' + name) + '\n');
console.log(error(fail_indicator + ' ' + name) + '\n');
assertions.forEach(function (a) {
if (a.failed()) {
a = utils.betterErrors(a);
Expand All @@ -79,10 +81,10 @@ exports.run = function (files, options, callback) {
},
moduleDone: function (name, assertions) {
if (!assertions.failures()) {
console.log('✔ all tests passed');
console.log(pass_indicator + ' all tests passed');
}
else {
console.log(error('✖ some tests failed'));
console.log(error(fail_indicator + ' some tests failed'));
}
},
done: function (assertions) {
Expand Down
10 changes: 6 additions & 4 deletions lib/reporters/verbose.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ exports.run = function (files, options, callback) {
var assertion_message = function (str) {
return options.assertion_prefix + str + options.assertion_suffix;
};
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔';
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖';

var start = new Date().getTime();
var paths = files.map(function (p) {
Expand Down Expand Up @@ -82,20 +84,20 @@ exports.run = function (files, options, callback) {
tracker.remove(name);

if (!assertions.failures()) {
console.log('✔ ' + name);
console.log(pass_indicator + ' ' + name);
}
else {
console.log(error('✖ ' + name));
console.log(error(fail_indicator + ' ' + name));
}
// verbose so print everything
assertions.forEach(function (a) {
if (a.failed()) {
console.log(error(' ' + a.message));
console.log(error(' ' + fail_indicator + ' ' + a.message));
a = utils.betterErrors(a);
console.log(' ' + a.error.stack);
}
else {
console.log(' ' + a.message);
console.log(' ' + pass_indicator + ' ' + a.message);
}
});
},
Expand Down