Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Array/from/mapfn-throws-exception.js

raw
1 // Copyright 2015 Microsoft Corporation. All rights reserved.
2 // This code is governed by the license found in the LICENSE file.
3
4 /*---
5 description: mapFn throws an exception
6 esid: sec-array.from
7 es6id: 22.1.2.1
8 ---*/
9
10 var array = [2, 4, 8, 16, 32, 64, 128];
11
12 function mapFn(value, index, obj) {
13 throw new Test262Error();
14 }
15
16 assert.throws(Test262Error, function() {
17 Array.from(array, mapFn);
18 });