-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestrunner.html
More file actions
33 lines (31 loc) · 791 Bytes
/
testrunner.html
File metadata and controls
33 lines (31 loc) · 791 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title></title>
<link rel="stylesheet" href="test/mocha.css"/>
</head>
<body>
<div id="mocha"></div>
<script>
var moduleName = location.href.split('?')[1].split('=')[1];
function loadJS(filename, onload) {
var scr = document.createElement('script');
scr.src = filename;
scr.onload = onload || function () {};
document.body.appendChild(scr);
}
loadJS(moduleName + '/' + moduleName + '.js', function () {
loadJS(moduleName + '/' + moduleName + '.spec.js', function () {
mocha.run();
});
});
</script>
<script src="test/mocha.js"></script>
<script src="test/chai.js"></script>
<script>
mocha.setup('bdd');
expect = chai.expect;
</script>
</body>
</html>