X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Ftest%2Fbrowser.mjs;h=0d9e9dd9ec414854fe42a7189046190c0f830914;hb=0ec2f12b9af8bd4f17570d87c10e52d3de6cf153;hp=fecaa3eccdd3f0d5f5d011f875a4defb9b33d0b2;hpb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;p=ldk-java diff --git a/ts/test/browser.mjs b/ts/test/browser.mjs index fecaa3ec..0d9e9dd9 100644 --- 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(); - 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(() => { - return test_runner('../../liblightningjs.wasm'); + return test_runner('../liblightningjs.wasm'); }); assert(ret);