<html>
<head>
<title>YUI Use Tests</title>
</head>
<body class="yui3-skin-sam">
<h1>Namespace Tests</h1>
<p><input type="button" value="Run Tests" id="btnRun" disabled="true" /></p>
<script type="text/javascript">
(function() {
YUI({
logExclude: {Dom: true, Selector: true, Node: true, attribute: true, base: true, event: true, widget: true}
}).use("test", function(Y) {
var count = 0, testUse;
YUI().use("*", function(Y2) {
Y.log('Use * entry');
count++;
testUse = new Y2.Test.Case({
name: "Usestar tests",
test_use_star: function () {
// Loader should not have been pulled in if dependencies are right
}
});
});
YUI({
bootstrap: false
}).use("test", "blahblah", function(Y3) {
// Y.log('Use missing');
count++;
testUse = new Y.Test.Case({
name: "Usestar tests",
test_missing_message: function () {
}
});
});
Y.Test.Runner.add(testUse);
testRan = new Y.Test.Case({
name: "ran tests",
test_ran: function () {
// tests to make sure the use('*') callback executed
Y.Assert.areEqual(2, count);
}
});
Y.Test.Runner.add(testRan);
});
})();
</script>
</body>
</html>