Skip to content
Permalink
Browse files
Improvements per @jaubourg
  • Loading branch information
gibson042 committed Dec 3, 2012
1 parent 5b9bf13 commit ad690f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
@@ -194,7 +194,9 @@ function ajaxTest( title, expect, options ) {
options.afterSend( request );
}

return request.then( callIfDefined( "done", "success" ), callIfDefined( "fail", "error" ) );
return request

This comment has been minimized.

Copy link
@jaubourg

jaubourg Dec 3, 2012

Member

I see this passes in testswarm but i have a feeling it's just by luck (and I have a feeling that's what makes test fail in IE10)... Now we feed $.when requests that will fail and will immediately end the join. Maybe using a counter (a modification of complete could handle it and be fed to the done and fail calls) would help achieve what you're looking for (rather than $.when)... it would also fix our concerns regarding speed by limiting the overhead of using ajaxTest.

This comment has been minimized.

Copy link
@dmethvin

dmethvin Dec 4, 2012

Member

The premature capitulation would apply to options.teardown below as well, right?

This comment has been minimized.

Copy link
@jaubourg

jaubourg Dec 4, 2012

Member

Yep, but it's been fixed already ;)

.done( callIfDefined( "done", "success" ) )
.fail( callIfDefined( "fail", "error" ) );
});

jQuery.when.apply( jQuery, requests ).always( complete, options.teardown, start);
@@ -141,7 +141,7 @@ var Globals = (function() {
return {
register: function( name ) {
globals[ name ] = true;
jQuery.globalEval( "var " + name );
jQuery.globalEval( "var " + name + " = undefined;" );
},
cleanup: function() {
var name,

0 comments on commit ad690f8

Please sign in to comment.