Skip to content

Commit

Permalink
test: improve readabilty of service worker console log (#1470)
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci authored Oct 17, 2024
1 parent f097f64 commit ac8887b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/e2e-tests/src/utils/consoleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ export class ConsoleManager {

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

getLogsAsString = async (): Promise<string | undefined> => {
let logs;
for (const log of ConsoleManager.capturedLogs) {
logs = `${logs} ${JSON.stringify(log)}`;
}
return logs;
};
getLogsAsString = async (): Promise<string | undefined> =>
ConsoleManager.capturedLogs.map(({ text }) => text).join('\n');

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

0 comments on commit ac8887b

Please sign in to comment.