projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d652fa
)
[TS] Log console messages in browser tests via playwright
author
Matt Corallo
<git@bluematt.me>
Mon, 17 Jan 2022 13:04:40 +0000
(13:04 +0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 17 Jan 2022 14:02:33 +0000
(14:02 +0000)
ts/test/browser.mjs
patch
|
blob
|
history
diff --git
a/ts/test/browser.mjs
b/ts/test/browser.mjs
index 03b5141415f860e53d4cdc9b31c1bfbdf0e1e086..0d9e9dd9ec414854fe42a7189046190c0f830914 100644
(file)
--- a/
ts/test/browser.mjs
+++ b/
ts/test/browser.mjs
@@
-5,6
+5,12
@@
for (const browserType of [chromium, firefox]) { // We'd like to test webkit, bu
const browser = await browserType.launch();
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);
+ });
await page.goto('http://localhost:8000/test/index.html');
const ret = await page.evaluate(() => {
return test_runner('../liblightningjs.wasm');