From ac8887b7162bbf3b6083a5c6f10bd70431f6836f Mon Sep 17 00:00:00 2001 From: Daniele Ricci Date: Thu, 17 Oct 2024 15:29:42 +0200 Subject: [PATCH] test: improve readabilty of service worker console log (#1470) --- packages/e2e-tests/src/utils/consoleManager.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/e2e-tests/src/utils/consoleManager.ts b/packages/e2e-tests/src/utils/consoleManager.ts index 9ffa9d138..f18dffe8d 100644 --- a/packages/e2e-tests/src/utils/consoleManager.ts +++ b/packages/e2e-tests/src/utils/consoleManager.ts @@ -41,13 +41,8 @@ export class ConsoleManager { getLogs = async (): Promise => ConsoleManager.capturedLogs; - getLogsAsString = async (): Promise => { - let logs; - for (const log of ConsoleManager.capturedLogs) { - logs = `${logs} ${JSON.stringify(log)}`; - } - return logs; - }; + getLogsAsString = async (): Promise => + ConsoleManager.capturedLogs.map(({ text }) => text).join('\n'); closeOpenedCdpSessions = async (): Promise => { await this.clearLogs();