Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Array/from/items-is-null-throws.js

raw
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: Throws a TypeError if items argument is null
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 assert.throws(TypeError, function() {
17 Array.from(null);
18 });