Permalink
Browse files

Deferred: pass lint in new catch tests

  • Loading branch information...
timmywil committed Jul 6, 2015
1 parent ef77f83 commit 203979d15391877c1d8ca2674e89dd16cba95029
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/unit/deferred.js
View
@@ -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();
});

0 comments on commit 203979d

Please sign in to comment.