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') {
72
72
assert . strictEqual ( err . message , 'Promise was rejected with a falsy value' ) ;
73
73
assert . strictEqual ( err . reason , value ) ;
74
74
} else {
75
- assert . strictEqual ( String ( value ) . endsWith ( err . message ) , true ) ;
75
+ assert . strictEqual ( String ( value ) . slice ( - err . message . length ) , err . message ) ;
76
76
}
77
77
} else {
78
78
assert . strictEqual ( err , value ) ;
@@ -97,7 +97,7 @@ if (typeof Symbol !== 'undefined') {
97
97
assert . strictEqual ( err . message , 'Promise was rejected with a falsy value' ) ;
98
98
assert . strictEqual ( err . reason , value ) ;
99
99
} else {
100
- assert . strictEqual ( String ( value ) . endsWith ( err . message ) , true ) ;
100
+ assert . strictEqual ( String ( value ) . slice ( - err . message . length ) , err . message ) ;
101
101
}
102
102
} else {
103
103
assert . strictEqual ( err , value ) ;
Original file line number Diff line number Diff line change @@ -691,8 +691,8 @@ function callbackify(original) {
691
691
// In true node style we process the callback on `nextTick` with all the
692
692
// implications (stack, `uncaughtException`, `async_hooks`)
693
693
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 ) ) } ) ;
696
696
}
697
697
698
698
Object . setPrototypeOf ( callbackified , Object . getPrototypeOf ( original ) ) ;
You can’t perform that action at this time.
0 commit comments