tests/auto/qml/ecmascripttests/test262/test/built-ins/Array/from/this-null.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: Does not throw if this is null |
| 7 | ---*/ |
| 8 | |
| 9 | var result = Array.from.call(null, []); |
| 10 | |
| 11 | assert(result instanceof Array, 'Does not throw if this is null'); |
| 12 | assert.sameValue(result.length, 0, 'result.length'); |