File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ if (typeof Symbol !== 'undefined') {
7272 assert . strictEqual ( err . message , 'Promise was rejected with a falsy value' ) ;
7373 assert . strictEqual ( err . reason , value ) ;
7474 } else {
75- assert . strictEqual ( String ( value ) . endsWith ( err . message ) , true ) ;
75+ assert . strictEqual ( String ( value ) . slice ( - err . message . length ) , err . message ) ;
7676 }
7777 } else {
7878 assert . strictEqual ( err , value ) ;
@@ -97,7 +97,7 @@ if (typeof Symbol !== 'undefined') {
9797 assert . strictEqual ( err . message , 'Promise was rejected with a falsy value' ) ;
9898 assert . strictEqual ( err . reason , value ) ;
9999 } else {
100- assert . strictEqual ( String ( value ) . endsWith ( err . message ) , true ) ;
100+ assert . strictEqual ( String ( value ) . slice ( - err . message . length ) , err . message ) ;
101101 }
102102 } else {
103103 assert . strictEqual ( err , value ) ;
Original file line number Diff line number Diff line change @@ -691,8 +691,8 @@ function callbackify(original) {
691691 // In true node style we process the callback on `nextTick` with all the
692692 // implications (stack, `uncaughtException`, `async_hooks`)
693693 original . apply ( this , args )
694- . then ( function ( ret ) { process . nextTick ( cb , null , ret ) } ,
695- function ( rej ) { process . nextTick ( callbackifyOnRejected , rej , cb ) } ) ;
694+ . then ( function ( ret ) { process . nextTick ( cb . bind ( null , null , ret ) ) } ,
695+ function ( rej ) { process . nextTick ( callbackifyOnRejected . bind ( null , rej , cb ) ) } ) ;
696696 }
697697
698698 Object . setPrototypeOf ( callbackified , Object . getPrototypeOf ( original ) ) ;
You can’t perform that action at this time.
0 commit comments