Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (30 sloc) 1.353 kb
<!DOCTYPE html>
<html>
<body>
<script src="http://yuim.in/"></script>
<script src="require-0.27.1.js"></script>
<script>
console.log('there are 5 tests');
require(['YUI!dd,anim', 'YUI!cookie'], function (A, B, C) {
var a = new A.Anim();
console.log("Test 1: " + (typeof A.Anim !== 'undefined' ? 'passed' : 'failed' ));
console.log("Test 2: " + (typeof A.Cookie === 'undefined' ? 'passed' : 'failed' ));
// console.log(A);
console.log("Test 3: " + (typeof B.Cookie !== 'undefined' ? 'passed' : 'failed' ));
console.log(C); //undefined
}
);
require(['YUI!yql'], function (Y) {
console.log("Test 4: " + (typeof Y.YQL !== 'undefined' ? 'passed' : 'failed' ));
});
require({YUI : { src : 'yui-min-341.js'}}, ['YUI!cookie'], function (Y) {
console.log("Test 5: " + (typeof Y.Cookie !== 'undefined' ? 'passed' : 'failed' ));
console.log("Test 6: " + (typeof Y.YQL === 'undefined' ? 'passed' : 'failed' ));
console.log(Y);
});
require(['YUI!foobar'], function (Y) {
//This will throw 'NOT loaded' warnings in the console.
});
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.