-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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 its chalk
/ 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 bundling chalk
. 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?