summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Array/from_surfaces.js
blob: 680b64817c7af7501c6cfc8365a46c839c9a39b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/ */

// Check superficial features of Array.from.
var desc = Object.getOwnPropertyDescriptor(Array, "from");
assertEq(desc.configurable, true);
assertEq(desc.enumerable, false);
assertEq(desc.writable, true);
assertEq(Array.from.length, 1);
assertThrowsInstanceOf(() => new Array.from(), TypeError);  // not a constructor

if (typeof reportCompare === 'function')
    reportCompare(0, 0);