-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (40 loc) · 1.48 KB
/
index.html
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
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<title>Exercises</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script>
window.showInstallMessage = function showInstallMessage() {
const msg = 'ERROR: Expected modules failed to load (chai, mocha)!!!\n\nHOW TO FIX: Run `npm install` in terminal from this project\'s folder.'
showInstallMessage.count = showInstallMessage.count ? showInstallMessage.count++ : 1
if (showInstallMessage.count >= 1) return console.error(msg)
alert(msg)
}
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.css" onerror="showInstallMessage()" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.js" onerror="showInstallMessage()"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.2.0/chai.min.js" onerror="showInstallMessage()"></script>
<script>
mocha.setup('bdd')
chai.config.includeStack = true
var expect = chai.expect
</script>
<style>
body {
zoom: 1.75;
}
#mocha .test h2 {
text-decoration: underline;
}
</style>
</head>
<body onload="mocha.run()">
<div id="mocha"></div>
<!-- load code you want to test here -->
<script src="index.js"></script>
<!-- load your test files here -->
<script src="test/index.test.js"></script>
</body>
</html>