From: Matt Corallo Date: Wed, 2 Feb 2022 19:29:45 +0000 (+0000) Subject: [TS] Fix CI when we log while the browser is shutting down X-Git-Tag: v0.0.105.0~2^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=6700d1496b231c4b27d91a66be0d5efdb741662c;p=ldk-java [TS] Fix CI when we log while the browser is shutting down --- diff --git a/ts/test/browser.mjs b/ts/test/browser.mjs index 5f65191a..e4e6112c 100644 --- a/ts/test/browser.mjs +++ b/ts/test/browser.mjs @@ -10,10 +10,12 @@ for (const browserType of [chromium, firefox]) { // We'd like to test webkit, bu const context = await browser.newContext(); const page = await context.newPage(); page.on('console', async msg => { - const values = []; - for (const arg of msg.args()) - values.push(await arg.jsonValue()); - console.log(...values); + try { + const values = []; + for (const arg of msg.args()) + values.push(await arg.jsonValue()); + console.log(...values); + } catch (_) { /* sometimes this gets hit if we're logging while the browser shuts down */ } }); await page.goto('http://localhost:8000/test/index.html'); var ret;