Skip to content

Commit ac8887b

Browse files
authored
test: improve readabilty of service worker console log (#1470)
1 parent f097f64 commit ac8887b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/e2e-tests/src/utils/consoleManager.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ export class ConsoleManager {
4141

4242
getLogs = async (): Promise<ConsoleLogEntry[]> => ConsoleManager.capturedLogs;
4343

44-
getLogsAsString = async (): Promise<string | undefined> => {
45-
let logs;
46-
for (const log of ConsoleManager.capturedLogs) {
47-
logs = `${logs} ${JSON.stringify(log)}`;
48-
}
49-
return logs;
50-
};
44+
getLogsAsString = async (): Promise<string | undefined> =>
45+
ConsoleManager.capturedLogs.map(({ text }) => text).join('\n');
5146

5247
closeOpenedCdpSessions = async (): Promise<void> => {
5348
await this.clearLogs();

0 commit comments

Comments
 (0)