forked from amark/gun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mocha.html
65 lines (62 loc) · 1.69 KB
/
mocha.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
60
61
62
63
64
65
<html>
<head>
<title>Gun Tests</title>
<link rel="stylesheet" href="./mocha.css"/>
<style>
</style>
</head>
</head>
<body>
Gun Tests
<div id="debug"></div>
<div id="mocha"></div>
<script src="./json2.js"></script>
<script src="./mocha.js"></script>
<script>mocha.setup({ui:'bdd',globals:[]});</script>
<script src="./expect.js"></script>
<script></script>
<script src="../gun.js"></script>
<!-- script
src="https://cdn.jsdelivr.net/npm/gun/sea.js">
</script -->
<script
src="../sea.js">
</script>
<script src="../lib/radix.js"></script>
<script src="../lib/radisk.js"></script>
<script src="../lib/store.js"></script>
<script src="../lib/rindexed.js"></script>
<script src="./rad/rad.js"></script>
<script src="./sea/sea.js"></script>
<script src="./common.js"></script>
<script>
if(location.search){
Gun.debug = true;
console.log('async?', Gun.debug);
}
var run = mocha.run(function(a,b,c){
//document.body.prepend("MARK! REMEMBER TO REMOVE RETURN!");return;
var yes = confirm("REFRESH BROWSER FOR ASYNC TESTS?");
if(yes){
if(location.search){
location.search = '';
} else {
location.search = '?async';
}
return;
}
/*console.log("???????????", a);
//if(a !== 0){ return }
document.getElementById('mocha-stats').id = 'mocha-stats2';
document.getElementById('mocha-report').style.display = 'none';
document.getElementById('mocha-report').id = 'mocha-report2';
Gun.debug = false;
mocha.run();*/
});
run.on("fail", function(test, err){
console.log("!!!!!!!!!!!", test, err);
//alert(5);
})
</script>
</body>
</html>