Fix: \$DONE() must not be called with an argument, unless the argument is an error.

This commit is contained in:
Rick Waldron 2020-02-07 12:16:55 -05:00
parent 0ebbdf0395
commit 811090fce2

View File

@ -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);
};