2014-10-23 19:58:31 +02:00
|
|
|
// Copyright 2014 Cubane Canada, Inc. All rights reserved.
|
|
|
|
// See LICENSE for details.
|
2014-07-17 19:49:35 +02:00
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: >
|
2015-02-10 22:01:39 +01:00
|
|
|
Promise.all expects an iterable argument;
|
2014-07-22 01:09:02 +02:00
|
|
|
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: 25.4.4.1_A3.1_T1
|
2014-07-22 01:09:02 +02:00
|
|
|
author: Sam Mikes
|
2014-10-23 19:58:31 +02:00
|
|
|
description: Promise.all(3) returns Promise rejected with TypeError
|
2016-02-12 18:59:51 +01:00
|
|
|
flags: [async]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
2014-07-17 19:49:35 +02:00
|
|
|
|
|
|
|
var nonIterable = 3;
|
|
|
|
|
|
|
|
Promise.all(nonIterable).then(function () {
|
|
|
|
$ERROR('Promise unexpectedly resolved: Promise.all(nonIterable) should throw TypeError');
|
|
|
|
},function (err) {
|
|
|
|
if (!(err instanceof TypeError)) {
|
|
|
|
$ERROR('Expected TypeError, got ' + err);
|
|
|
|
}
|
2014-10-23 19:58:31 +02:00
|
|
|
}).then($DONE, $DONE);
|