From f7b11b2b649490edff69cb7af4a7fa485b8d092d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:20:06 -0400 Subject: [PATCH] Testing --- scripts/generateReport.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 6db461ab..d58815a2 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -76,6 +76,8 @@ const IGNORED_DISCORD_ERRORS = [ "Attempting to set fast connect zstd when unsupported" ] as Array; +let done: boolean = false; + function toCodeBlock(s: string, indentation = 0, isDiscord = false) { s = s.replace(/```/g, "`\u200B`\u200B`"); @@ -264,9 +266,8 @@ page.on("console", async e => { report.badWebpackFinds.push(otherMessage); break; case "Finished test": - await browser.close(); + done = true; await printReport(); - process.exit(); } } } @@ -315,3 +316,10 @@ await page.evaluateOnNewDocument(` (${reporterRuntime.toString()})(${JSON.stringify(process.env.DISCORD_TOKEN)}); } `); + +await page.goto(CANARY ? "https://canary.discord.com/login" : "https://discord.com/login"); + +if (done) { + await browser.close(); + process.exit(); +}