-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Ensure workers inherit color level from main process #1701
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
Comments
I got thrown off by I'm refactoring a lot of code at the moment and Chalk's instantiation came up, so I'm tackling that part now. Once that lands we should support the color level option in the |
See #1722. |
With #1722, AVA now uses its own
Additionally (though this could be done as a follow-up), we should expand the |
This is ready to be worked on again, if anybody wants to pick it up 😀 |
This has been addressed.
I'm not sure if this is important, so I'm not going to open this issue. |
Workers don't inherit the correct color level from the main process. @nowells raised this in #1455. This got entangled with a solution for #1393, by @kevva in #1401. I'm now fixing that with #1700.
As of #1700 workers remove AVA's internal flags from
process.argv
. We could apply the solution from #1455 so workers correctly inherit the color level.I'm concerned that
chalk
/supports-color
will behave inconsistently in the test processes. If the user code shares itschalk
/supports-color
dependencies with AVA, they'll inherit the color level from the main process. Otherwise the color level is detected afresh. I don't think AVA should foist the--color
/--no-color
flags onto the worker process. We could solve this inconsistency by bundlingchalk
. That way we can be sure to only configure our copy and leave user code unaffected. Users can still manipulate color levels in their test processes through environment variables or additional command line arguments.@nowells, @kevva, @sindresorhus, what do you think?
The text was updated successfully, but these errors were encountered: