-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 1.51 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Deep clone Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" />
<style type="text/css">
#test-runner {
padding: 10px 5px;
background-color: #1da1f2;
color: #fff;
border-radius: 3px;
width: 120px;
cursor: pointer;
border: 1px solid #1da1f2;
}
a {
display: inline-block;
margin-left: 10px;
text-decoration: none;
}
</style>
</head>
<body>
<div style="text-align:center; margin: 15px;">
<button id="test-runner">Run tests</button>
<a href="./deep-clone.js" target="_blank">View function source (deep-clone.js)</a>
<a href="./deep-clone.test.js" target="_blank">View test source (deep-clone.test.js)</a>
</div>
<div id="mocha" style="margin:auto; width: 850px;"></div>
<script src="https://unpkg.com/chai/chai.js"></script>
<script src="https://unpkg.com/mocha/mocha.js"></script>
<script src="deep-clone.js"></script>
<script class="mocha-init">
mocha.setup('bdd');
mocha.checkLeaks();
</script>
<script src="deep-clone.test.js"></script>
<script class="mocha-exec">
document.getElementById('test-runner').addEventListener('click', function(e) {
e.preventDefault();
mocha.run();
});
//mocha.run();
</script>
</body>
</html>