it would be good to have a switch that disable colors in console output f.e --no-color
it was useful when ava used under some CI systems f.e. TeamCity and color coding showed as plain text in test reports.

Yeah, it should already work, but trying it out now it doesn't. We'll look into it. We're probably just not passing the flag down to the spawned test file.
Also, please open up an issue on https://github.com/chalk/supports-color with the output of running node -p 'process.env' (ensure you scrub any sensitive info) in TeamCity so we can try to disable colors automatically for you.
Submitted a PR to fix this - https://github.com/chalk/supports-color/pull/39.
Oh damn, did not see the "good for beginner" badge... Sorry!
@vdemedes No worries. The beginner badge is for fixing the --no-color flag in AVA.
Obv. this should still be done, but is the OP using TeamCIty 9.1+? Colored output was supported with https://youtrack.jetbrains.com/issue/TW-23760
As far as I can tell this issue has been made available again because of lack of activity in #1104. So I would like to see if I can finish up what @thinkimlazy started on.
@ThomasBem go for it!
@ThomasBem great! I think u need to check if main proccess has color flag disabled, then pass it to child test proccesses. And write tests. GL!
I got it to work for the mini and verbose test reporters already. Gotten quiet familiar with those two from my recent issues / PR`s. Combined with the work you had already done that went really fast. Now I gotta figure out how to stop it from printing color in the tests themselves.
So gotta read some more code! :)
Still doesn't work correctly in 0.18.2:
import test from 'ava';
test('Test', (t) => {
t.is(1, 2);
});
$ ava --verbose --no-color > test.log 2>&1
$ open test.log
脳 Test
1 test failed [20:29:45]
Test
D:\Code\js\ava-sandbox\test.js:4
3: test('Test', (t) => {
4: t.is(1, 2);
5: });
Actual:
[33m1[39m
Expected:
[33m2[39m
@aemxdp interesting. https://github.com/avajs/ava/pull/1334 should fix that.