Fix Promise/prototype/finally/rejected-observable-then-calls-argument

This commit is contained in:
Gus Caplan 2020-02-08 15:06:33 -08:00 committed by Rick Waldron
parent 47f8c1c976
commit 900855b07b
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ flags: [async]
Promise.reject(new Test262Error())
.finally(function() {})
.then(() => $DONE(), $DONE);
.then($DONE, () => $DONE());
var calls = 0;
var expected = [
@ -28,7 +28,7 @@ var expected = [
];
var then = Promise.prototype.then;
Promise.prototype.then = function(resolve) {
Promise.prototype.then = function(resolve, reject) {
assert(!isConstructor(resolve));
assert.sameValue(resolve.length, expected[calls].length);
assert.sameValue(resolve.name, expected[calls].name);
@ -38,5 +38,5 @@ Promise.prototype.then = function(resolve) {
calls += 1;
return then.call(this, resolve);
return then.call(this, resolve, reject);
};