Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
peetklecha committed Dec 19, 2023
1 parent f3258f0 commit e5643e8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
18 changes: 18 additions & 0 deletions test/built-ins/Promise/withResolvers/builtin-prototype.js
Original file line number Diff line number Diff line change
@@ -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"
);
9 changes: 0 additions & 9 deletions test/built-ins/Promise/withResolvers/builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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"
);
8 changes: 5 additions & 3 deletions test/built-ins/Promise/withResolvers/length.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
8 changes: 5 additions & 3 deletions test/built-ins/Promise/withResolvers/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
8 changes: 5 additions & 3 deletions test/built-ins/Promise/withResolvers/prop-desc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})

0 comments on commit e5643e8

Please sign in to comment.