Commits

Scott Koon committed b8e11fb

Finally fixed the broken test and added a new one to make sure all the scripts are loaded.

  • Participants
  • Parent commits 5b70c5b

Comments (0)

Files changed (1)

         , "Is $b defined?"
         , "$b is not defined");
 
-
+testSuite.add(function() {
+    var scripts = document.getElementsByTagName("script");
+    return (scripts.length==5);
+}
+        , "Are all 5 scripts loaded?"
+        , "All 5 scripts are loaded.")
 testSuite.add(function() {
     return ( document.getElementById("test") != null )
 }
 testSuite.add(function() {
     var scripts = document.getElementsByTagName("script");
     for(var i = 0;i< scripts.length;i++) {
-        if( scripts[i].src == "test2.js" ) { return true; }
+        if("src" in scripts[i] && scripts[i].src.indexOf("test2.js") > -1 ) { return true; }
     }
     return false;    
 }