fix(testrunner): console.log in color (#3633)
This commit is contained in:
parent
5f86253ad4
commit
a6b9922eb8
|
|
@ -16,11 +16,18 @@
|
|||
|
||||
import { initializeImageMatcher } from './expect';
|
||||
import { TestRunner, fixturePool } from './testRunner';
|
||||
import { Console } from 'console';
|
||||
|
||||
let closed = false;
|
||||
|
||||
sendMessageToParent('ready');
|
||||
|
||||
global.console = new Console({
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
colorMode: process.env.FORCE_COLOR === '1',
|
||||
});
|
||||
|
||||
process.stdout.write = chunk => {
|
||||
if (testRunner && !closed)
|
||||
testRunner.stdout(chunk);
|
||||
|
|
|
|||
Loading…
Reference in a new issue