Skip to content

Commit 5c3d41b

Browse files
committed
[minor] Nicer output from test runner
1 parent 38bd906 commit 5c3d41b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/core/run

+5-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ function runTest(test, callback) {
4545
child.on('exit', function (exitCode) {
4646
clearTimeout(killTimeout);
4747

48-
console.log(' ' + ((exitCode) ? '✘'.red : '✔'.green) + ' ' +
49-
path.basename(test) + (exitCode && ' (exit code: ' + exitCode + ')'));
48+
console.log(' ' + ((exitCode) ? '✘'.red : '✔'.green) + ' ' +
49+
path.basename(test) +
50+
(exitCode ? (' (exit code: ' + exitCode + ')') : ''));
5051
results[test] = { exitCode: exitCode };
5152
callback();
5253
//
@@ -68,13 +69,14 @@ if (!tests.length) {
6869
//
6970
}
7071

72+
console.log('Running tests:'.bold);
7173
async.forEachSeries(tests, runTest, function () {
7274
var failed = [], ok = [];
7375
for (var test in results) {
7476
(results[test].exitCode != 0 ? failed : ok).push(test);
7577
}
7678

77-
console.log('\nSummary:');
79+
console.log('\nSummary:'.bold);
7880
console.log((' ' + ok.length + '\tpassed tests').green);
7981
console.log((' ' + failed.length + '\tfailed tests').red);
8082
});

0 commit comments

Comments
 (0)