not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
1.4 KiB

<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>