Plato on Github
Report Home
dojo/testsDOH/_base/loader/cdnTest.js
Maintainability
77.41
Lines of code
39
Difficulty
8.72
Estimated Errors
0.42
Function weight
By Complexity
By SLOC
dojo.loadInit(function(){ // this function is evaluated first and only once dojoCdnTestLog.push("loadInit in cdnTest"); // define a global variable dojoCdnTest= 1; }); dojoCdnTestLog.push("in-dojo.testsDOH._base.loader.cdnTest"); dojo.provide("dojo.testsDOH._base.loader.cdnTest"); dojo.provide("dojo.testsDOH._base.loader.cdnTest2"); dojo.testsDOH._base.loader.cdnTest.status= "OK"; dojo.testsDOH._base.loader.cdnTest2.status= "OK"; dojo.require("dojo.testsDOH._base.loader.syncModule"); dojo.require("dojo.testsDOH._base.loader.amdModule"); dojo.requireLocalization("dojo.testsDOH._base.loader", "syncBundle", "ab-cd-ef"); dojo.requireLocalization("dojo.testsDOH._base.loader", "amdBundle", "ab-cd-ef"); (function(){ var t1= dojo.i18n.getLocalization("dojo.testsDOH._base.loader", "syncBundle"); var t2= dojo.i18n.getLocalization("dojo.testsDOH._base.loader", "syncBundle", "ab-cd-ef"); var t3= dojo.i18n.getLocalization("dojo.testsDOH._base.loader", "amdBundle"); var t4= dojo.i18n.getLocalization("dojo.testsDOH._base.loader", "amdBundle", "ab-cd-ef"); require(["doh"], function(doh){ doh.register("test-i18n-inline", function(t){ t.is(t1.syncBundle, "syncBundle"); t.is(t2.syncBundle, "syncBundle-ab-cd-ef"); t.is(t3.amdBundle, "amdBundle"); t.is(t4.amdBundle, "amdBundle-ab-cd-ef"); }); }); })(); dojo.requireIf(dojoCdnTest==1, "dojo.testsDOH._base.loader.syncModule1"); dojo.requireAfterIf(dojoCdnTest==1, "dojo.testsDOH._base.loader.amdModule1"); dojo.requireIf(dojoCdnTest==2, "dojo.testsDOH._base.loader.syncModule2"); dojo.requireAfterIf(dojoCdnTest==2, "dojo.testsDOH._base.loader.amdModule2"); dojoCdnTestLog.push("out-dojo.testsDOH._base.loader.cdnTest");