test262/test/language/rest-parameters/rest-parameters-produce-an-array.js
Rick Waldron c8aabb3664 Import tests from Google V8 (Rest Parameters)
These tests are derived from the following files within the Google V8 project:

    test/mjsunit/harmony/rest-params.js
2015-03-31 16:56:24 -04:00

13 lines
405 B
JavaScript

// Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 14.1
description: >
Rest parameter produces an instance of Array
---*/
function af(...a) {
assert.sameValue(a.constructor, Array, "The value of `a.constructor` is `Array`");
assert(Array.isArray(a), "`Array.isArray(a)` returns `true`");
}
af(1);