-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (36 loc) · 1.08 KB
/
index.html
File metadata and controls
45 lines (36 loc) · 1.08 KB
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
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
// This is just a super light testing framework.
function expect(a,b){
var result = document.createElement("P");
result.className = a === b ? "success" : "error";
result.innerHTML = "expected '"+a+"' to equal '"+b+"'";
document.getElementById("testResults").appendChild(result);
}
</script>
<style type="text/css">
.success { color: green; }
.error { color: red; }
</style>
<script type="text/javascript" src="require.js"></script>
<script type="text/javascript">
// Configuration of requirejs-isolate
require(["isolate"], function(isolate){
isolate.configure( function(ctx){
ctx.map("b", { name: function(){ return "global map"; } })
.passthru("c");
});
});
// Configuration of requirejs
require({ baseUrl: "js" });
// triggering of main application
require(["tests"]);
</script>
</head>
<body>
<h1>Test results:</h1>
<div id="testResults"></div>
</body>
</html>