fix: do not override console object in worker (#14455)

This commit is contained in:
Yury Semikhatsky 2022-05-29 09:46:19 -07:00 committed by GitHub
parent c1aecc7d50
commit 9f47160673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,6 @@
* limitations under the License.
*/
import { Console } from 'console';
import * as util from 'util';
import type { RunPayload, TeardownErrorsPayload, TestOutputPayload, WorkerInitParams } from './ipc';
import { startProfiling, stopProfiling } from './profiler';
@ -25,12 +24,6 @@ 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: string | Buffer) => {
const outPayload: TestOutputPayload = {
testId: workerRunner?._currentTest?._test._id,