forked from llaske/sugarizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
56 lines (51 loc) · 1.41 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
<html>
<head>
<meta charset="utf-8"/>
<title>Sugarizer Tests</title>
<link href="https://cdn.rawgit.com/mochajs/mocha/2.3.0/mocha.css" rel="stylesheet" />
</head>
<body>
<div id="mocha"></div>
<script src="../lib/require.js"></script>
<script src="../lib/chai.js"></script>
<script src="../lib/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>
<script src="https://cdn.rawgit.com/mochajs/mocha/2.3.0/mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script src="datastore.js"></script>
<script src="presence.js"></script>
<script>
// Init mocha
mocha.checkLeaks();
mocha.globals(['sugar*']);
requirejs.config({ baseUrl: "../lib" });
// Init Sugarizer settings
var initSugarizer = function(updatedSettings) {
window.localStorage.clear();
var initSettings = {
name: "Mocha",
color: 163,
colorvalue: { stroke: '#AC32FF', fill: '#FF8F00' }
};
if (updatedSettings) {
for (var key in updatedSettings) {
initSettings[key] = updatedSettings[key];
}
}
window.localStorage.setItem("sugar_settings", JSON.stringify(initSettings));
};
// Init modules
var datastore;
var chai;
var presence;
initSugarizer();
requirejs(["sugar-web/datastore", "chai", "sugar-web/presence"], function(d, c, p) {
datastore = d;
chai = c;
presence = p;
// Run tests
mocha.run();
});
</script>
</body>
</html>