diff --git a/test/built-ins/Promise/withResolvers/builtin-prototype.js b/test/built-ins/Promise/withResolvers/builtin-prototype.js new file mode 100644 index 00000000000..ac7dd4437d1 --- /dev/null +++ b/test/built-ins/Promise/withResolvers/builtin-prototype.js @@ -0,0 +1,18 @@ +// Copyright (C) 2023 Peter Klecha. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-promise.withresolvers +features: [promise-with-resolvers] +description: Promise.withResolvers meets the requirements for built-in objects +info: | + Built-in functions that are not constructors do not have a "prototype" + property unless otherwise specified in the description of a particular + function. +---*/ + +assert.sameValue( + Object.getOwnPropertyDescriptor(Promise.withResolvers, "prototype"), + undefined, + "Promise.withResolvers has no own prototype property" +); diff --git a/test/built-ins/Promise/withResolvers/builtin.js b/test/built-ins/Promise/withResolvers/builtin.js index 6ba11f77ceb..3ec6989535f 100644 --- a/test/built-ins/Promise/withResolvers/builtin.js +++ b/test/built-ins/Promise/withResolvers/builtin.js @@ -16,9 +16,6 @@ info: | the expression Function.prototype (20.2.3), as the value of its [[Prototype]] internal slot. - Built-in functions that are not constructors do not have a "prototype" - property unless otherwise specified in the description of a particular - function. ---*/ assert(Object.isExtensible(Promise.withResolvers), "Promise.withResolvers is extensible"); @@ -28,9 +25,3 @@ assert.sameValue( Function.prototype, "Prototype of Promise.withResolvers is Function.prototype" ); - -assert.sameValue( - Object.getOwnPropertyDescriptor(Promise.withResolvers, "prototype"), - undefined, - "Promise.withResolvers has no own prototype property" -); diff --git a/test/built-ins/Promise/withResolvers/length.js b/test/built-ins/Promise/withResolvers/length.js index 5864cb1eb5f..957b2de6ebf 100644 --- a/test/built-ins/Promise/withResolvers/length.js +++ b/test/built-ins/Promise/withResolvers/length.js @@ -21,6 +21,8 @@ includes: [propertyHelper.js] assert.sameValue(Promise.withResolvers.length, 0); -verifyNotEnumerable(Promise.withResolvers, 'length'); -verifyNotWritable(Promise.withResolvers, 'length'); -verifyConfigurable(Promise.withResolvers, 'length'); +verifyProperty(Promise.withResolvers, 'length', { + enumerable: false, + writable: false, + configurable: true, +}) diff --git a/test/built-ins/Promise/withResolvers/name.js b/test/built-ins/Promise/withResolvers/name.js index b26c1a30739..6eb1c52fd01 100644 --- a/test/built-ins/Promise/withResolvers/name.js +++ b/test/built-ins/Promise/withResolvers/name.js @@ -22,6 +22,8 @@ includes: [propertyHelper.js] assert.sameValue(Promise.withResolvers.name, 'withResolvers'); -verifyNotEnumerable(Promise.withResolvers, 'name'); -verifyNotWritable(Promise.withResolvers, 'name'); -verifyConfigurable(Promise.withResolvers, 'name'); +verifyProperty(Promise.withResolvers, 'name', { + enumerable: false, + writable: false, + configurable: true, +}) diff --git a/test/built-ins/Promise/withResolvers/prop-desc.js b/test/built-ins/Promise/withResolvers/prop-desc.js index 7117dfc0988..fff2febf5e5 100644 --- a/test/built-ins/Promise/withResolvers/prop-desc.js +++ b/test/built-ins/Promise/withResolvers/prop-desc.js @@ -14,6 +14,8 @@ info: | includes: [propertyHelper.js] ---*/ -verifyNotEnumerable(Promise, 'withResolvers'); -verifyWritable(Promise, 'withResolvers'); -verifyConfigurable(Promise, 'withResolvers'); +verifyProperty(Promise, 'withResolvers', { + enumerable: false, + writable: true, + configurable: true, +})