forked from andrzejsliwa/backbone-couch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
spec.html
53 lines (50 loc) · 1.93 KB
/
spec.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
<!DOCTYPE html>
<html>
<head>
<title>Testing: Backbone.couch.js ...</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet/less" type="text/css" href="css/styles.less">
<link rel="stylesheet" type="text/css" href="spec/vendor/jasmine.css">
<script type="text/javascript" src="spec/vendor/LAB.min.js"></script>
<script type="text/javascript">
$LAB
.script("js/vendor/jquery.js").wait()
.script("js/vendor/jquery.couch.js").wait()
.script("js/vendor/underscore.js").wait()
.script("js/vendor/backbone.js").wait()
.script("js/backbone.couch.js").wait(function() {
Backbone.couch.databaseName = "backbone-couch-test";
Backbone.couch.ddocName = "backbone-couch";
Backbone.couch.ddocChange(function(ddocName){
if (console && console.log) {
console.log("current ddoc: '" + ddocName + "' changed");
console.log("restarting...");
}
window.location.reload();
});
Backbone.couch.destroyAllData();
})
.script("spec/vendor/jasmine.js").wait()
.script("spec/vendor/jasmine.html.js")
.script("spec/vendor/jasmine.jquery.js")
.script("spec/vendor/jquery.mockjax.js")
.script("spec/spec.helper.js").wait()
.script("spec/spec.js").wait(function() {
var jasmineEnv = jasmine.getEnv(),
trivialReporter = new jasmine.TrivialReporter();
jasmineEnv.updateInterval = 1000;
jasmineEnv.addReporter(trivialReporter);
jasmineEnv.specFilter = function(spec) {
return trivialReporter.specFilter(spec);
};
jasmineEnv.execute();
});
</script>
</head>
<body>
<span class="warning">Autorestart Enabled: Make sure that only one testing window is open !!!</span>
<div id="content">
</div>
</body>
</html>