@ -164,7 +164,7 @@ asyncTest('Catching a promise rejection after setImmediate is not' +
} ) ;
_ reject ( e ) ;
setImmediate ( function ( ) {
promise . then ( assert . fail , function ( ) { } ) ;
promise . then ( common . fail , function ( ) { } ) ;
} ) ;
} ) ;
@ -176,7 +176,7 @@ asyncTest('When re-throwing new errors in a promise catch, only the' +
assert . strictEqual ( e2 , reason ) ;
assert . strictEqual ( promise2 , promise ) ;
} ) ;
var promise2 = Promise . reject ( e ) . then ( assert . fail , function ( reason ) {
var promise2 = Promise . reject ( e ) . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
throw e2 ;
} ) ;
@ -206,7 +206,7 @@ asyncTest('When re-throwing new errors in a promise catch, only the ' +
setTimeout ( function ( ) {
reject ( e ) ;
} , 1 ) ;
} ) . then ( assert . fail , function ( reason ) {
} ) . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
throw e2 ;
} ) ;
@ -225,7 +225,7 @@ asyncTest('When re-throwing new errors in a promise catch, only the re-thrown' +
setTimeout ( function ( ) {
reject ( e ) ;
process . nextTick ( function ( ) {
promise2 = promise . then ( assert . fail , function ( reason ) {
promise2 = promise . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
throw e2 ;
} ) ;
@ -240,7 +240,7 @@ asyncTest('unhandledRejection should not be triggered if a promise catch is' +
function ( done ) {
var e = new Error ( ) ;
onUnhandledFail ( done ) ;
Promise . reject ( e ) . then ( assert . fail , function ( ) { } ) ;
Promise . reject ( e ) . then ( common . fail , function ( ) { } ) ;
} ) ;
asyncTest ( 'unhandledRejection should not be triggered if a promise catch is' +
@ -250,7 +250,7 @@ asyncTest('unhandledRejection should not be triggered if a promise catch is' +
onUnhandledFail ( done ) ;
new Promise ( function ( _ , reject ) {
reject ( e ) ;
} ) . then ( assert . fail , function ( ) { } ) ;
} ) . then ( common . fail , function ( ) { } ) ;
} ) ;
asyncTest ( 'Attaching a promise catch in a process.nextTick is soon enough to' +
@ -259,7 +259,7 @@ asyncTest('Attaching a promise catch in a process.nextTick is soon enough to' +
onUnhandledFail ( done ) ;
var promise = Promise . reject ( e ) ;
process . nextTick ( function ( ) {
promise . then ( assert . fail , function ( ) { } ) ;
promise . then ( common . fail , function ( ) { } ) ;
} ) ;
} ) ;
@ -271,7 +271,7 @@ asyncTest('Attaching a promise catch in a process.nextTick is soon enough to' +
reject ( e ) ;
} ) ;
process . nextTick ( function ( ) {
promise . then ( assert . fail , function ( ) { } ) ;
promise . then ( common . fail , function ( ) { } ) ;
} ) ;
} ) ;
@ -302,7 +302,7 @@ asyncTest('catching a promise which is asynchronously rejected (via' +
reject ( e ) ;
} , 1 ) ;
} ) ;
} ) . then ( assert . fail , function ( reason ) {
} ) . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
} ) ;
} ) ;
@ -313,7 +313,7 @@ asyncTest('Catching a rejected promise derived from throwing in a' +
onUnhandledFail ( done ) ;
Promise . resolve ( ) . then ( function ( ) {
throw e ;
} ) . then ( assert . fail , function ( reason ) {
} ) . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
} ) ;
} ) ;
@ -325,7 +325,7 @@ asyncTest('Catching a rejected promise derived from returning a' +
onUnhandledFail ( done ) ;
Promise . resolve ( ) . then ( function ( ) {
return Promise . reject ( e ) ;
} ) . then ( assert . fail , function ( reason ) {
} ) . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
} ) ;
} ) ;
@ -380,7 +380,7 @@ asyncTest('Catching the Promise.all() of a collection that includes a' +
'rejected promise prevents unhandledRejection' , function ( done ) {
var e = new Error ( ) ;
onUnhandledFail ( done ) ;
Promise . all ( [ Promise . reject ( e ) ] ) . then ( assert . fail , function ( ) { } ) ;
Promise . all ( [ Promise . reject ( e ) ] ) . then ( common . fail , function ( ) { } ) ;
} ) ;
asyncTest ( 'Catching the Promise.all() of a collection that includes a ' +
@ -395,7 +395,7 @@ asyncTest('Catching the Promise.all() of a collection that includes a ' +
} ) ;
p = Promise . all ( [ p ] ) ;
process . nextTick ( function ( ) {
p . then ( assert . fail , function ( ) { } ) ;
p . then ( common . fail , function ( ) { } ) ;
} ) ;
} ) ;
@ -430,7 +430,7 @@ asyncTest('Waiting setTimeout(, 10) to catch a promise causes an' +
throw e ;
} ) ;
setTimeout ( function ( ) {
thePromise . then ( assert . fail , function ( reason ) {
thePromise . then ( common . fail , function ( reason ) {
assert . strictEqual ( e , reason ) ;
} ) ;
} , 10 ) ;