mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #11736. Remove deprecated Deferred.isResolved/isRejected.
This commit is contained in:
parent
fe88534b29
commit
c5fda2945c
@ -73,9 +73,6 @@ jQuery.extend({
|
||||
|
||||
// [ reject_list | resolve_list ].disable; progress_list.lock
|
||||
}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
|
||||
|
||||
// <DEPRECATED> [ isResolved | isRejected ] = [ resolve_list | reject_list ].fired
|
||||
promise[ "isR" + stateString.substr( 1 ) ] = list.fired;
|
||||
}
|
||||
|
||||
// deferred[ resolve | reject | notify ] = list.fire
|
||||
|
@ -8,7 +8,7 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
|
||||
|
||||
test("jQuery.Deferred" + withNew, function() {
|
||||
|
||||
expect( 23 );
|
||||
expect( 21 );
|
||||
|
||||
var defer = createDeferred();
|
||||
|
||||
@ -16,7 +16,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
|
||||
|
||||
createDeferred().resolve().done(function() {
|
||||
ok( true , "Success on resolve" );
|
||||
ok( this.isResolved(), "Deferred is resolved" );
|
||||
strictEqual( this.state(), "resolved", "Deferred is resolved (state)" );
|
||||
}).fail(function() {
|
||||
ok( false , "Error on resolve" );
|
||||
@ -28,7 +27,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
|
||||
ok( false , "Success on reject" );
|
||||
}).fail(function() {
|
||||
ok( true , "Error on reject" );
|
||||
ok( this.isRejected(), "Deferred is rejected" );
|
||||
strictEqual( this.state(), "rejected", "Deferred is rejected (state)" );
|
||||
}).always(function() {
|
||||
ok( true , "Always callback on reject" );
|
||||
|
Loading…
Reference in New Issue
Block a user