-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Do not clobber forked process color level #1455
Conversation
Chalk uses `supports-color` to determine what color level should be rendered. However, currently our parent `ava` process uses that to colorize its output, however, when we fork our test processes we clobber the color configuration that `supports-color` uses to determine the level (see https://github.com/chalk/supports-color/blob/master/index.js#L37-L42) This PR carries the current color level through to the forked processes so if they log output that is colorized it will remain so with the same fidelity of colors as the parent ava process.
Interesting. #1401 aims to forward Of course the forked processes still can't detect the color support, and we can't necessarily expect the user to know what to specify either. Does this mean we should provide a value for |
Yes, the forked process should get the exact same color level as AVA. |
Re-reading my original comment I'm not exactly sure what I meant! I think the conclusion is:
@sindresorhus did I get this right? |
This should also happen if no And it should also pass the |
@sindresorhus that's not my understanding based on our discussion in #1401 (comment). |
@novemberborn It should just work as if the child process was run in the same process as AVA. |
Yes, but per #1393 we should only pass |
Chalk uses
supports-color
to determine what color level should berendered. However, currently our parent
ava
process uses that tocolorize its output, however, when we fork our test processes we clobber
the color configuration that
supports-color
uses to determine thelevel (see https://github.com/chalk/supports-color/blob/master/index.js#L37-L42)
This PR carries the current color level through to the forked processes
so if they log output that is colorized it will remain so with the same
fidelity of colors as the parent ava process.