From 203979d15391877c1d8ca2674e89dd16cba95029 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 6 Jul 2015 17:10:26 -0400 Subject: [PATCH] Deferred: pass lint in new catch tests --- test/unit/deferred.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/deferred.js b/test/unit/deferred.js index af91b3616..1aa15435f 100644 --- a/test/unit/deferred.js +++ b/test/unit/deferred.js @@ -172,7 +172,7 @@ test( "jQuery.Deferred.catch", function( assert ) { var value1, value2, value3, defer = jQuery.Deferred(), - piped = defer.catch(function( a, b ) { + piped = defer[ "catch" ](function( a, b ) { return a * b; }), done = jQuery.map( new Array( 3 ), function() { return assert.async(); } ); @@ -186,18 +186,18 @@ test( "jQuery.Deferred.catch", function( assert ) { value2 = b; }); - defer.reject( 2, 3 ).catch(function() { + defer.reject( 2, 3 )[ "catch" ](function() { assert.strictEqual( value1, 2, "first reject value ok" ); assert.strictEqual( value2, 3, "second reject value ok" ); assert.strictEqual( value3, 6, "result of filter ok" ); done.pop().call(); }); - jQuery.Deferred().resolve().catch(function() { + jQuery.Deferred().resolve()[ "catch" ](function() { assert.ok( false, "then should not be called on resolve" ); }).then( done.pop() ); - jQuery.Deferred().reject().catch( jQuery.noop ).done(function( value ) { + jQuery.Deferred().reject()[ "catch" ]( jQuery.noop ).done(function( value ) { assert.strictEqual( value, undefined, "then fail callback can return undefined/null" ); done.pop().call(); }); -- 2.39.5