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

50 lines
1.6 KiB
HTML

<!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>