mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 20:44:43 +02:00
Fix: \$DONE() must not be called with an argument, unless the argument is an error.
This commit is contained in:
parent
0ebbdf0395
commit
811090fce2
@ -21,7 +21,7 @@ var value = {};
|
|||||||
|
|
||||||
Promise.resolve(value)
|
Promise.resolve(value)
|
||||||
.finally(function() {})
|
.finally(function() {})
|
||||||
.then($DONE, $DONE);
|
.then(() => $DONE(), $DONE);
|
||||||
|
|
||||||
var calls = 0;
|
var calls = 0;
|
||||||
var expected = [
|
var expected = [
|
||||||
@ -37,6 +37,6 @@ Promise.prototype.then = function(resolve) {
|
|||||||
if (calls === 0) {
|
if (calls === 0) {
|
||||||
assert.sameValue(resolve(), value);
|
assert.sameValue(resolve(), value);
|
||||||
}
|
}
|
||||||
|
calls += 1;
|
||||||
return then.call(this, resolve);
|
return then.call(this, resolve);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user