]> git.bitcoin.ninja Git - ldk-java/blob - ts/test/index.html
[TS] Log console messages in browser tests via playwright
[ldk-java] / ts / test / index.html
1 <!DOCTYPE html>
2 <html>
3 <head></head>
4 <body>
5 <h1><div id="results">Running LDK-TS Tests...</div></h1>
6 <script type="text/javascript">
7         var test_runner;
8 </script>
9 <script type="module">
10         import { run_tests } from './tests.mjs';
11         test_runner = run_tests;
12         try {
13                 const result = await run_tests('../liblightningjs.wasm');
14                 if (result === true) {
15                         document.getElementById("results").innerHTML = "All Tests Passed (note free-time errors may still occurr)!";
16                 } else {
17                         document.getElementById("results").innerHTML = "Some Tests Failed!";
18                 }
19         } catch (e) {
20                 console.error(e);
21                 document.getElementById("results").innerHTML = "Test failed with exception: " + e;
22         }
23 </script>
24 </body>
25 </html>