Files
geek-calc/tests/index.html
snowprint 54f427ea21
Some checks failed
Deploy to GitHub Pages / build-and-deploy (push) Has been cancelled
init geek calc
2025-10-04 10:53:41 +08:00

68 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Geek Calculator - Tests</title>
<style>
body {
font-family: monospace;
padding: 20px;
background-color: #000;
color: #0f0;
}
.test-results {
margin-top: 20px;
}
.test-result {
margin: 5px 0;
padding: 5px;
}
.pass {
color: #0f0;
}
.fail {
color: #f00;
}
.summary {
margin-top: 20px;
padding: 10px;
background-color: #222;
}
</style>
</head>
<body>
<h1>Geek Calculator - Test Runner</h1>
<p>Running all tests...</p>
<div id="test-results" class="test-results">
<!-- Test results will be inserted here by JavaScript -->
</div>
<div id="summary" class="summary">
<!-- Test summary will be inserted here -->
</div>
<!-- Load the test harness -->
<script src="test-harness.js"></script>
<!-- Load the modules to be tested -->
<script src="../calculator.js"></script>
<script src="../rpn-calculator.js"></script>
<script src="../state.js"></script>
<!-- Load the test files -->
<script src="unit/calculator.test.js"></script>
<script src="unit/rpn-calculator.test.js"></script>
<script src="unit/math.test.js"></script>
<script src="unit/rpn.test.js"></script>
<script src="integration/ui.test.js"></script>
<script>
// Run all tests when page loads
document.addEventListener('DOMContentLoaded', function() {
runAllTests();
});
</script>
</body>
</html>