testit/test/runner.html

26 lines
795 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Test It Spec</title>
<script src="../src/testit.js"></script>
<script src="./index.spec.js"></script>
</head>
<body>
<script>
test.run(function(r) {
document.body.style.backgroundColor = (
r.fail.length ? "#ff9999" : "#99ff99"
);
r.pass.forEach((p) => document.write(`<br>${p}`));
r.fail.forEach((f) => document.write(`<br><b>${f}</b>`));
document.write(`<p>tests ${r.pass.length + r.fail.length} pass ${r.pass.length} fail ${r.fail.length}`);
});
</script>
</body>
</html>