web-apps/vendor/requirejs/tests/configRequirejs.html

50 lines
1.6 KiB
HTML
Raw Normal View History

2016-03-11 00:48:53 +00:00
<!DOCTYPE html>
<html>
<head>
<title>require.js: Config requirejs Test</title>
<script type="text/javascript" src="doh/runner.js"></script>
<script type="text/javascript" src="doh/_browserRunner.js"></script>
<script>
function require() {
return "pristine";
}
function done() {
doh.register(
"config",
[
function config(t){
t.is("pristine", require());
t.is("blue", s.color);
t.is("dimple-blue", d.color);
t.is("You called a function", f());
}
]
);
doh.run();
}
var s, d, f,
requirejs = {
baseUrl: "./",
paths: {
domReady: '../../domReady/domReady'
},
deps: ["require", "simple", "dimple", "func", "domReady"],
callback: function (require, simple, dimple, func, domReady) {
s = simple;
d = dimple;
f = func;
done();
}
};
</script>
<script type="text/javascript" src="../require.js"></script>
</head>
<body>
<h1>require.js: Config requirejs Test</h1>
<p>Tests requirejs being defined as an object with init and ready configuration.</p>
<p>Check console for messages.</p>
</body>
</html>