| 1 |
// Copyright 2015 Leonardo Balter. All rights reserved. |
| 2 |
// This code is governed by the license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
esid: sec-array.from |
| 5 |
es6id: 22.1.2.1 |
| 6 |
description: Return empty array if items argument is an ArrayBuffer |
| 7 |
info: | |
| 8 |
22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] ) |
| 9 |
|
| 10 |
... |
| 11 |
4. Let usingIterator be GetMethod(items, @@iterator). |
| 12 |
5. ReturnIfAbrupt(usingIterator). |
| 13 |
... |
| 14 |
---*/ |
| 15 |
|
| 16 |
var arrayBuffer = new ArrayBuffer(7); |
| 17 |
|
| 18 |
var result = Array.from(arrayBuffer); |
| 19 |
|
| 20 |
assert.sameValue(result.length, 0); |