projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eab6928
)
[TS] Fix CI when we log while the browser is shutting down
author
Matt Corallo
<git@bluematt.me>
Wed, 2 Feb 2022 19:29:45 +0000
(19:29 +0000)
committer
Matt Corallo
<git@bluematt.me>
Wed, 2 Feb 2022 19:31:01 +0000
(19:31 +0000)
ts/test/browser.mjs
patch
|
blob
|
history
diff --git
a/ts/test/browser.mjs
b/ts/test/browser.mjs
index 5f65191a3bb7df5d221a9d21bdd1eb5d31281620..e4e6112cbc88c065b162d38245b7508e17493d97 100644
(file)
--- 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 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;
});
await page.goto('http://localhost:8000/test/index.html');
var ret;