create first html page
This commit is contained in:
40
mochaChai.html
Normal file
40
mochaChai.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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/chai2.js"></script>
|
||||
<script src="/test-utils/mocha2.js"></script>
|
||||
|
||||
<script class="mocha-init" type="module">
|
||||
mocha.setup({ ui: "tdd", timeout: "2000"});
|
||||
mocha.checkLeaks();
|
||||
window.addEventListener("load", function () {
|
||||
// Callback so that the test results get reported to CI
|
||||
mocha.run(function (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>
|
Reference in New Issue
Block a user