|
1 | | -<!-- |
2 | | -Toolbox Aid |
3 | | -David Quesenberry |
4 | | -03/21/2026 |
5 | | -testRunner.html |
6 | | ---> |
7 | | -<!DOCTYPE HTML> |
8 | | - |
| 1 | +<!DOCTYPE html> |
9 | 2 | <html lang="en"> |
10 | | - |
11 | 3 | <head> |
12 | | - <meta charset="UTF-8"> |
13 | | - <title>Game Engine Test Runner</title> |
14 | | - <style> |
15 | | - body { |
16 | | - margin: 0; |
17 | | - min-height: 100vh; |
18 | | - display: flex; |
19 | | - flex-direction: column; |
20 | | - align-items: center; |
21 | | - justify-content: center; |
22 | | - gap: 12px; |
23 | | - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
24 | | - background: #141414; |
25 | | - color: #f5f5f5; |
26 | | - } |
27 | | - </style> |
28 | | - <script type="module" src="./testRunner.js" defer></script> |
| 4 | +<meta charset="UTF-8"> |
| 5 | +<title>Test Runner Guide</title> |
| 6 | + |
| 7 | +<style> |
| 8 | +body { |
| 9 | + font-family: Consolas, monospace; |
| 10 | + background: #0f1117; |
| 11 | + color: #e6edf3; |
| 12 | + padding: 30px; |
| 13 | + line-height: 1.6; |
| 14 | +} |
| 15 | + |
| 16 | +h1 { color: #58a6ff; } |
| 17 | +h2 { color: #79c0ff; margin-top: 30px; } |
| 18 | + |
| 19 | +.box { |
| 20 | + background: #161b22; |
| 21 | + padding: 20px; |
| 22 | + margin: 20px 0; |
| 23 | + border-radius: 8px; |
| 24 | + border-left: 5px solid #58a6ff; |
| 25 | +} |
| 26 | + |
| 27 | +.warning { border-left-color: #f1c40f; } |
| 28 | +.error { border-left-color: #e74c3c; } |
| 29 | + |
| 30 | +pre { |
| 31 | + background: #0d1117; |
| 32 | + padding: 15px; |
| 33 | + border-radius: 6px; |
| 34 | + overflow-x: auto; |
| 35 | + color: #7ee787; |
| 36 | +} |
| 37 | + |
| 38 | +button { |
| 39 | + margin-top: 10px; |
| 40 | + padding: 8px 12px; |
| 41 | + background: #238636; |
| 42 | + color: white; |
| 43 | + border: none; |
| 44 | + border-radius: 5px; |
| 45 | + cursor: pointer; |
| 46 | +} |
| 47 | + |
| 48 | +button:hover { |
| 49 | + background: #2ea043; |
| 50 | +} |
| 51 | +</style> |
29 | 52 | </head> |
30 | 53 |
|
31 | 54 | <body> |
32 | | - <h1>Game Engine Test Runner</h1> |
33 | | - <p>Open the browser console to view test progress and results.</p> |
34 | | -</body> |
35 | 55 |
|
| 56 | +<h1>🧪 Node Test Runner</h1> |
| 57 | + |
| 58 | +<div class="box"> |
| 59 | + <h2>🚀 Run All Tests</h2> |
| 60 | + <pre id="cmd">node scripts/run-node-tests.mjs</pre> |
| 61 | + <button onclick="copyCmd()">Copy Command</button> |
| 62 | +</div> |
| 63 | + |
| 64 | +<div class="box"> |
| 65 | + <h2>📊 Expected Result</h2> |
| 66 | + <pre>116/116 explicit run() tests passed</pre> |
| 67 | +</div> |
| 68 | + |
| 69 | +<div class="box"> |
| 70 | + <h2>🔁 Watch Mode (Auto Re-run)</h2> |
| 71 | + <pre id="watchCmd">node --watch scripts/run-node-tests.mjs</pre> |
| 72 | + <button onclick="copyWatch()">Copy Watch Command</button> |
| 73 | +</div> |
| 74 | + |
| 75 | +<div class="box warning"> |
| 76 | + <h2>⚠️ Important</h2> |
| 77 | + <p> |
| 78 | + This test suite uses <b>Node-only modules</b> (like <code>node:assert/strict</code>). |
| 79 | + <br><br> |
| 80 | + 👉 Tests <b>cannot run in the browser</b>. |
| 81 | + </p> |
| 82 | +</div> |
| 83 | + |
| 84 | +<div class="box"> |
| 85 | + <h2>🧠 Quick Steps</h2> |
| 86 | + <ul> |
| 87 | + <li>Open VS Code</li> |
| 88 | + <li>Press <b>Ctrl + `</b> to open terminal</li> |
| 89 | + <li>Ensure you're in project root</li> |
| 90 | + <li>Run the command above</li> |
| 91 | + </ul> |
| 92 | +</div> |
| 93 | + |
| 94 | +<div class="box"> |
| 95 | + <h2>💡 What Looks Like Errors (but isn't)</h2> |
| 96 | + <pre>[AsteroidsNewBoot] FAIL missing-canvas</pre> |
| 97 | + <p> |
| 98 | + These are <b>intentional test scenarios</b>, not failures. |
| 99 | + <br> |
| 100 | + ✔ If you see <b>116/116 passed</b>, everything is working. |
| 101 | + </p> |
| 102 | +</div> |
| 103 | + |
| 104 | +<div class="box error"> |
| 105 | + <h2>❌ Real Problems</h2> |
| 106 | + <ul> |
| 107 | + <li>Tests stop early</li> |
| 108 | + <li>Missing PASS lines</li> |
| 109 | + <li>No final "116/116 passed"</li> |
| 110 | + </ul> |
| 111 | +</div> |
| 112 | + |
| 113 | +<script> |
| 114 | +function copyCmd() { |
| 115 | + navigator.clipboard.writeText(document.getElementById("cmd").innerText); |
| 116 | + alert("Copied test command 👍"); |
| 117 | +} |
| 118 | + |
| 119 | +function copyWatch() { |
| 120 | + navigator.clipboard.writeText(document.getElementById("watchCmd").innerText); |
| 121 | + alert("Copied watch command 👍"); |
| 122 | +} |
| 123 | +</script> |
| 124 | + |
| 125 | +</body> |
36 | 126 | </html> |
0 commit comments