projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[TS] Log console messages in browser tests via playwright
[ldk-java]
/
ts
/
test
/
browser.mjs
diff --git
a/ts/test/browser.mjs
b/ts/test/browser.mjs
index fecaa3eccdd3f0d5f5d011f875a4defb9b33d0b2..0d9e9dd9ec414854fe42a7189046190c0f830914 100644
(file)
--- a/
ts/test/browser.mjs
+++ b/
ts/test/browser.mjs
@@
-5,9
+5,15
@@
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();
const browser = await browserType.launch();
const context = await browser.newContext();
const page = await context.newPage();
- await page.goto('http://localhost:8000/ts/test/index.html');
+ 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(() => {
const ret = await page.evaluate(() => {
- return test_runner('../
../
liblightningjs.wasm');
+ return test_runner('../liblightningjs.wasm');
});
assert(ret);
});
assert(ret);