| 1 |
// Copyright (C) 2015 André Bargull. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es6id: 25.4.1.5.1 |
| 6 |
description: The `length` property of GetCapabilitiesExecutor functions |
| 7 |
info: | |
| 8 |
The length property of a GetCapabilitiesExecutor function is 2. |
| 9 |
|
| 10 |
17 ECMAScript Standard Built-in Objects: |
| 11 |
Unless otherwise specified, the length property of a built-in Function |
| 12 |
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, |
| 13 |
[[Configurable]]: true }. |
| 14 |
includes: [propertyHelper.js] |
| 15 |
---*/ |
| 16 |
|
| 17 |
var executorFunction; |
| 18 |
|
| 19 |
function NotPromise(executor) { |
| 20 |
executorFunction = executor; |
| 21 |
executor(function() {}, function() {}); |
| 22 |
} |
| 23 |
Promise.resolve.call(NotPromise); |
| 24 |
|
| 25 |
assert.sameValue(executorFunction.length, 2); |
| 26 |
|
| 27 |
verifyNotEnumerable(executorFunction, "length"); |
| 28 |
verifyNotWritable(executorFunction, "length"); |
| 29 |
verifyConfigurable(executorFunction, "length"); |