Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html runner now supports specifing .html tests in url #35

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 20 additions & 18 deletions doh/_parseURLargs.js
Expand Up @@ -162,15 +162,7 @@

deps: ["dohDojo/domReady", "doh"],

callback: function(domReady, doh){
domReady(function(){
doh._fixHeight();
doh.breakOnError= breakOnError;
require(test, function(){
doh.run();
});
});
},
callback: callback,

async: async
};
Expand All @@ -190,20 +182,30 @@
'dojox'
],
deps: ["dojo/domReady", "doh/main"],
callback: function(domReady, doh){
domReady(function(){
doh._fixHeight();
doh.breakOnError= breakOnError;
require(test, function(){
doh.run();
});
});
},
callback: callback,
async: async,
isDebug: 1
};
}

function callback(domReady, doh){
domReady(function(){
doh._fixHeight();
doh.breakOnError= breakOnError;
for (var amdTests = [], i = 0, l = test.length; i < l; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amdTests should be declared at the top of the function scope, as it is used later, outside of this block.

var module = test[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module should be declared at the top of the function scope, so it is not redeclared every time inside of this loop.

if(/\.html$/.test(module)){
doh.register(module, require.toUrl(module), 999999);
}else{
amdTests.push(module);
}
}
require(amdTests, function(){
doh.run();
});
});
}

// load all of the dohPlugins
if(dohPlugins){
var i = 0;
Expand Down