mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 12:34:41 +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)
|
||||
.finally(function() {})
|
||||
.then($DONE, $DONE);
|
||||
.then(() => $DONE(), $DONE);
|
||||
|
||||
var calls = 0;
|
||||
var expected = [
|
||||
@ -37,6 +37,6 @@ Promise.prototype.then = function(resolve) {
|
||||
if (calls === 0) {
|
||||
assert.sameValue(resolve(), value);
|
||||
}
|
||||
|
||||
calls += 1;
|
||||
return then.call(this, resolve);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user