-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathindex.html
59 lines (53 loc) · 1.46 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!doctype html>
<html>
<head>
<title>Raven.js Test Suite</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
</head>
<body>
<div id="mocha"></div>
<!-- Mocha -->
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
<script>
mocha.ui('bdd');
mocha.reporter('html');
var assert = chai.assert
</script>
<!-- Mocking -->
<script src="../node_modules/sinon/pkg/sinon.js"></script>
<script>
window.__DEV__ = true;
beforeEach(function() {
this.sinon = sinon.sandbox.create();
});
afterEach(function() {
this.sinon.restore();
});
</script>
<!-- Tests -->
<script src="../build/raven.test.js"></script>
<script>
(function(runner){
var failed = [];
runner.on('fail', function(test, err){
failed.push({
title: test.title,
fullTitle: test.fullTitle(),
error: {
message: err.message,
stack: err.stack
}
});
});
runner.on('end', function(){
runner.stats.failed = failed;
if (typeof global !== "undefined") {
global.mochaResults = runner.stats;
}
});
})(mocha.run());
</script>
</body>
</html>