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
|
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/mocha.css">
<script src="../app/assets/javascripts/yui/yui/yui.js"></script>
<script src="../app/modules.js"></script>
<script src="assets/chai.js"></script>
<script src="assets/mocha.js"></script>
<script>
var assert = chai.assert,
expect = chai.expect
should = chai.should();
mocha.setup({'ui': 'bdd', 'ignoreLeaks': true})
</script>
<script src="test_env.js"></script>
<script src="test_model.js"></script>
<script src="test_app.js"></script>
<script>
YUI().use('node', 'event', function(Y) {
Y.on('domready', function() {
var config = GlobalConfig;
for (group in config.groups) {
var group = config.groups[group];
for (m in group.modules) {
var resource = group.modules[m];
if (!m || !resource.fullpath) {
continue
}
// resource.fullpath = resource.fullpath.replace('/\//', '../app/', 1);
resource.fullpath = '../app/' + resource.fullpath;
}
}
console.log("global config", GlobalConfig)
// Load before test runner
mocha.run();
});
});
</script>
</head>
<body>
<div id="omnibar"> </div>
<div id="main" class="container"> </div>
<div id="mocha"></div>
</body>
</html>
|