funcunit
Version:
<!-- @hide title
35 lines (28 loc) • 636 B
JavaScript
define("@config", ["@loader"], function(loader) {
loader.config({
meta: {
"jquerty": {
exports: "jQuerty"
}
}
});
});
System.define("jquerty","window.jQuerty = {name: 'jQuerty'}")
define("bar", ["jquerty"],function(jquerty){
return {
name: "bar",
jquerty: jquerty
};
});
define("foo",["bar"], function(bar){
if(typeof window !== "undefined" && window.QUnit) {
QUnit.ok(bar, "got basics/module");
QUnit.equal(bar.name, "bar", "module name is right");
QUnit.equal(bar.jquerty.name, "jQuerty", "got global");
QUnit.start();
removeMyself();
return {};
} else {
console.log("basics loaded", bar);
}
});