-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrewcode-test.html
More file actions
32 lines (27 loc) · 979 Bytes
/
brewcode-test.html
File metadata and controls
32 lines (27 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<title>BrewCode Test</title>
</head>
<body>
<h1>BrewCode API Test</h1>
<button onclick="runTest()">Run Test</button>
<pre id="output"></pre>
<script type="module">
import BrewCode from './brewcode.js';
window.runTest = async function() {
const output = document.getElementById('output');
output.textContent = 'Running tests...\n';
try {
await BrewCode.init();
output.textContent += '✅ Database initialized\n';
const types = BrewCode.ingredient.getAllTypes();
output.textContent += `✅ Found ${types.length} ingredient types\n`;
output.textContent += '\n🎉 ALL TESTS PASSED!';
} catch (error) {
output.textContent += `\n❌ ERROR: ${error.message}`;
}
};
</script>
</body>
</html>