Promise.any: string iterable should not be rejected (adds error message for clarity)

This commit is contained in:
Rick Waldron 2020-03-12 12:55:58 -04:00
parent e0abeaa4df
commit 55b22d8d9f
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ flags: [async]
try { try {
Promise.any('').then(function(v) { Promise.any('').then(function(v) {
assert.sameValue(v.length, 0); assert.sameValue(v.length, 0);
}, function() { }, function(error) {
$DONE('The promise should be resolved, but was rejected'); $DONE(`The promise should be resolved, but was rejected with error: ${error.message}`);
}).then($DONE, $DONE); }).then($DONE, $DONE);
} catch (error) { } catch (error) {
$DONE(`The promise should be resolved, but threw an exception: ${error.message}`); $DONE(`The promise should be resolved, but threw an exception: ${error.message}`);