web-apps/vendor/requirejs/tests/config.html
Maxim Kadushkin 741b10515d webapps added
2016-03-10 21:48:53 -03:00

45 lines
1.4 KiB
HTML

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