2014-10-23 19:58:31 +02:00
|
|
|
// Copyright 2014 Cubane Canada, Inc. All rights reserved.
|
|
|
|
// See LICENSE for details.
|
|
|
|
|
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-02-10 22:01:39 +01:00
|
|
|
Promise.all expects an iterable argument;
|
2014-10-23 19:58:31 +02:00
|
|
|
fails if recieves an abrupt completion
|
|
|
|
ref 7.4.1 non-Object fails CheckIterable
|
|
|
|
ref 7.4.2 GetIterator throws TypeError if CheckIterable fails
|
2015-02-10 22:01:39 +01:00
|
|
|
es6id: S25.4.4.1_A3.1_T2
|
2014-10-23 19:58:31 +02:00
|
|
|
author: Sam Mikes
|
|
|
|
description: Promise.all(new Error()) returns Promise rejected with TypeError
|
2016-02-12 18:59:51 +01:00
|
|
|
flags: [async]
|
2014-10-23 19:58:31 +02:00
|
|
|
---*/
|
|
|
|
|
2018-02-15 21:11:21 +01:00
|
|
|
Promise.all(new Error("abrupt")).then(function() {
|
2021-07-21 21:48:13 +02:00
|
|
|
throw new Test262Error('Promise unexpectedly resolved: Promise.all(abruptCompletion) should throw TypeError');
|
2018-02-15 21:11:21 +01:00
|
|
|
}, function(err) {
|
2021-08-18 17:44:54 +02:00
|
|
|
assert(!!(err instanceof TypeError), 'The value of !!(err instanceof TypeError) is expected to be true');
|
2018-02-15 21:11:21 +01:00
|
|
|
}).then($DONE, $DONE);
|