-
- cache = 0;
-
- for( i = 1 ; i < 3 ; i++ ) {
- jQuery.when( cache || deferred , "done" ).done( function( value ) {
- strictEqual( value , 1 , "Custom method: resolved" + ( i > 1 ? " only once" : "" ) );
- cache = value;
- }).fail( function() {
- ok( false , "Custom method: fail called" );
- });
- }
-
- stop();
-
- jQuery.when( jQuery( document ) , "ready" ).then( function( test ) {
- strictEqual( test , jQuery , "jQuery.fn.ready recognized as a deferred" );
- start();
- });