-
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
Conversation
@@ -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'); |
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
because Array.prototype.concat
already can concat single values
Array.prototype.concat docs
Object.keys(colors).forEach(function (key) { | ||
colors[key].enabled = true; | ||
}); | ||
|
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.
This turns on colors no matter what.
Object.keys(colors).forEach(function (key) { | ||
colors[key].enabled = true; | ||
}); | ||
|
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 need to turn on colors no matter what while testing. Also in case that Istanbul turning them off at this condition
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Force to use colors while testing
And get rid of useless arrify
--no-color
flag down to the forked process - fixes #843
It also needs to pass the |
Colors in test files disabled by default. Without flag
|
Not for me:
|
8610723
to
4acb78f
Compare
Hey @thinkimlazy, happy holidays! Will you have some free time soon to finish this up? |
@vadimdemedes Hello, I'm quite busy right now so I'm not sure that I can fix this any time soon. |
Closing for lack of activity and to free it up for someone else interested in working on this. |
Sorry that I accidentally deleted last one.
Also I want to notice that just
chalk.enabled = true
not working, because functions fromlib/colors.js
has ownenabled
property. So we need that loop