diff options
Diffstat (limited to 'test/unit/deferred.js')
-rw-r--r-- | test/unit/deferred.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/deferred.js b/test/unit/deferred.js index eab14da2d..4a50da2c1 100644 --- a/test/unit/deferred.js +++ b/test/unit/deferred.js @@ -56,6 +56,19 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) { }); } ); +test( "jQuery.Deferred - chainability", function() { + + var methods = "resolve reject notify resolveWith rejectWith notifyWith done fail progress then always".split( " " ), + defer = jQuery.Deferred(); + + expect( methods.length ); + + jQuery.each( methods, function( _, method ) { + var object = { m: defer[ method ] }; + strictEqual( object.m(), object, method + " is chainable" ); + }); +}); + test( "jQuery.Deferred.pipe - filtering (done)", function() { expect(4); |