diff --git a/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js b/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js index d7b808611ce..648b7dd6f9d 100644 --- a/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js +++ b/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js @@ -27,6 +27,7 @@ target.then = function(a, b) { }; var originalFinallyHandler = function () {}; +var anonName = Object(function () {}).name; var result = Promise.prototype.finally.call(target, originalFinallyHandler, 2, 3); @@ -43,11 +44,16 @@ assert.sameValue( 'Invokes `then` method with a function as the first argument' ); assert.notSameValue(firstArg, originalFinallyHandler, 'Invokes `then` method with a different fulfillment handler'); +assert.sameValue(firstArg.length, 1, 'fulfillment handler has a length of 1'); +assert.sameValue(firstArg.name, anonName, 'fulfillment handler is anonymous'); + assert.sameValue( typeof secondArg, 'function', 'Invokes `then` method with a function as the second argument' ); -assert.notSameValue(secondArg, originalFinallyHandler, 'Invokes `then` method with a different fulfillment handler'); +assert.notSameValue(secondArg, originalFinallyHandler, 'Invokes `then` method with a different rejection handler'); +assert.sameValue(secondArg.length, 1, 'rejection handler has a length of 1'); +assert.sameValue(secondArg.name, anonName, 'rejection handler is anonymous'); assert.sameValue(result, returnValue, 'Returns the result of the invocation of `then`');