-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Pass --no-color
flag down to the forked process - fixes #843
#1104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ var test = require('tap').test; | |
global.Promise = require('bluebird'); | ||
var getStream = require('get-stream'); | ||
var figures = require('figures'); | ||
var arrify = require('arrify'); | ||
var chalk = require('chalk'); | ||
var mkdirp = require('mkdirp'); | ||
var touch = require('touch'); | ||
|
@@ -21,6 +20,10 @@ var cliPath = path.join(__dirname, '../cli.js'); | |
chalk.enabled = true; | ||
var colors = require('../lib/colors'); | ||
|
||
Object.keys(colors).forEach(function (key) { | ||
colors[key].enabled = true; | ||
}); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to turn on colors no matter what while testing. Also in case that Istanbul turning them off at this condition |
||
function execCli(args, opts, cb) { | ||
var dirname; | ||
var env; | ||
|
@@ -43,7 +46,7 @@ function execCli(args, opts, cb) { | |
var stderr; | ||
|
||
var processPromise = new Promise(function (resolve) { | ||
child = childProcess.spawn(process.execPath, [path.relative(dirname, cliPath)].concat(arrify(args)), { | ||
child = childProcess.spawn(process.execPath, [path.relative(dirname, cliPath)].concat(args, '--color'), { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Force to use colors while testing |
||
cwd: dirname, | ||
env: env, | ||
stdio: [null, 'pipe', 'pipe'] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need
arrify
becauseArray.prototype.concat
already can concat single valuesArray.prototype.concat docs