forked from kmiyashiro/grunt-mocha
-
Notifications
You must be signed in to change notification settings - Fork 6
/
test2.html
45 lines (40 loc) · 1.63 KB
/
test2.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
44
45
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Example Mocha Test</title>
<link rel="stylesheet" href="css/mocha.css" type="text/css" charset="utf-8" />
</head>
<body>
<!-- Required for browser reporter -->
<div id="mocha"></div>
<!-- mocha -->
<script src="../../node_modules/mocha/mocha.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// This will be overridden by mocha-helper if you run with grunt
mocha.setup('bdd');
</script>
<!-- Include your assertion lib of choice -->
<script src="../../node_modules/chai/chai.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// Setup chai
var expect = chai.expect;
</script>
<!-- Include anything you want to test -->
<script src="../js/wombat.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/apple.js" type="text/javascript" charset="utf-8"></script>
<!-- Spec files -->
<script src="spec/wombat.js" type="text/javascript" charset="utf-8"></script>
<script src="spec/apple.js" type="text/javascript" charset="utf-8"></script>
<script src="spec/cyclical.js" type="text/javascript" charset="utf-8"></script>
<!-- run mocha -->
<script type="text/javascript" charset="utf-8">
// If tests run in a real browser
// Can alternatively do a check on window.PHANTOMJS
if (navigator.userAgent.indexOf('PhantomJS') < 0) {
mocha
.run();
}
</script>
</body>
</html>