Uncluttered/mochaChai.html
2023-11-26 20:43:18 +00:00

41 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/test-utils/mocha.css" />
<!--
<script type="importmap">
{
"imports": {
}
}
</script>
-->
</head>
<body>
<div id="mocha"></div>
<script src="/test-utils/chai.js"></script>
<script src="/test-utils/mocha.js"></script>
<script class="mocha-init" type="module">
mocha.setup({ ui: "tdd", timeout: "2000"})
mocha.checkLeaks()
window.addEventListener("load", function loaded () {
// Callback so that the test results get reported to CI
mocha.run(function mochaRan (failures) {
window._testResults = {
done: true,
failures,
succeeded: failures ? false : true,
}
})
})
</script>
<!-- Include the test files as script elements. -->
<!-- <script src="/path/to/file.js" type="module"></script> -->
</body>
</html>