From 36f73c61421f142c56346a2c79d1c0cf7db0b4ed Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Wed, 19 Aug 2020 02:03:35 +0300 Subject: [PATCH] Add Function.prototype.length property descriptor test --- test/built-ins/Function/prototype/length.js | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/built-ins/Function/prototype/length.js diff --git a/test/built-ins/Function/prototype/length.js b/test/built-ins/Function/prototype/length.js new file mode 100644 index 0000000000..bc1b489bff --- /dev/null +++ b/test/built-ins/Function/prototype/length.js @@ -0,0 +1,28 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-the-function-prototype-object +description: > + Function.prototype.length is 0. +info: | + Properties of the Function Prototype Object + + The Function prototype object: + + [...] + * has a "length" property whose value is 0. + + ECMAScript Standard Built-in Objects + + Unless otherwise specified, the "length" property of a built-in function object has + the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Function.prototype, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +});