this repo has no description
1<!DOCTYPE html>
2<html>
3<head>
4 <title>js_top_worker_client Browser Test</title>
5 <style>
6 body { font-family: monospace; padding: 20px; }
7 #status { margin-bottom: 20px; }
8 .pass { color: green; }
9 .fail { color: red; }
10 </style>
11</head>
12<body>
13 <h1>js_top_worker_client Browser Test</h1>
14 <div id="status">Running tests...</div>
15 <pre id="log"></pre>
16
17 <script>
18 // Capture console.log for display
19 const logEl = document.getElementById('log');
20 const originalLog = console.log;
21 console.log = function(...args) {
22 originalLog.apply(console, args);
23 const text = args.map(a => typeof a === 'string' ? a : JSON.stringify(a)).join(' ');
24 logEl.textContent += text + '\n';
25
26 // Update status when done
27 if (window.testResults && window.testResults.done) {
28 const status = document.getElementById('status');
29 const passed = window.testResults.passed;
30 const failed = window.testResults.failed;
31 if (failed === 0) {
32 status.innerHTML = '<span class="pass">All ' + passed + ' tests passed!</span>';
33 } else {
34 status.innerHTML = '<span class="fail">' + failed + ' tests failed</span> (' + passed + ' passed)';
35 }
36 }
37 };
38 </script>
39 <script src="client_test.bc.js"></script>
40</body>
41</html>