Skip to content

Commit

Permalink
[minor] Allow user to set colors.mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Dec 18, 2011
1 parent 5c3d41b commit 48d4a8b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/core/run
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ var fs = require('fs'),
path = require('path'),
spawn = require('child_process').spawn,
async = require('async'),
colors = require('colors');
colors = require('colors'),
optimist = require('optimist');

optimist.argv.color && (colors.mode = optimist.argv.color);

var testTimeout = 15000;
var results = {};
Expand Down Expand Up @@ -57,7 +60,9 @@ function runTest(test, callback) {
});
};

var tests = process.argv.slice(2);
var tests = process.argv.slice(2).filter(function (test) {
return test.substr(0, 2) != '--';
});

if (!tests.length) {
var pathPrefix = path.join(__dirname, 'simple');
Expand Down

0 comments on commit 48d4a8b

Please sign in to comment.