From 5681934937e0ddf53c8e0c9c60fc67f7f8106f32 Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Wed, 30 Mar 2022 16:05:04 +0200 Subject: [PATCH] fix(default-reporter): use loglevel to filter deprecation warnings (#4343) --- packages/default-reporter/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/default-reporter/src/index.ts b/packages/default-reporter/src/index.ts index 39bf10aa293..85cc2eae154 100644 --- a/packages/default-reporter/src/index.ts +++ b/packages/default-reporter/src/index.ts @@ -104,6 +104,12 @@ export function toOutput$ ( const progressPushStream = new Rx.Subject() const stagePushStream = new Rx.Subject() const deprecationPushStream = new Rx.Subject() + if (opts.reportingOptions?.logLevel === 'error') { + // disable logging + // workaround for Rx.Subject.empty() + // https://github.com/ReactiveX/rxjs/discussions/6916 + deprecationPushStream.next = () => null + } const summaryPushStream = new Rx.Subject() const lifecyclePushStream = new Rx.Subject() const statsPushStream = new Rx.Subject()