Skip to content

increase test coverage of Promise.withResolvers#3936

Draft
peetklecha wants to merge 2 commits intotc39:mainfrom
peetklecha:moar-promise-with-resolvers
Draft

increase test coverage of Promise.withResolvers#3936
peetklecha wants to merge 2 commits intotc39:mainfrom
peetklecha:moar-promise-with-resolvers

Conversation

@peetklecha
Copy link
Contributor

No description provided.

Comment on lines 32 to 36
assert.sameValue(
Object.getOwnPropertyDescriptor(Promise.withResolvers, "prototype"),
undefined,
"Promise.withResolvers has no own prototype property"
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be nice if this was in a separate file - my polyfills cover the first, but can't trivially cover the second, and i'd rather skip those tests.

Comment on lines 22 to 26
assert.sameValue(Promise.withResolvers.length, 0);

verifyNotEnumerable(Promise.withResolvers, 'length');
verifyNotWritable(Promise.withResolvers, 'length');
verifyConfigurable(Promise.withResolvers, 'length');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #3935, let's use verifyProperty here

Comment on lines 23 to 27
assert.sameValue(Promise.withResolvers.name, 'withResolvers');

verifyNotEnumerable(Promise.withResolvers, 'name');
verifyNotWritable(Promise.withResolvers, 'name');
verifyConfigurable(Promise.withResolvers, 'name');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

Comment on lines 17 to 19
verifyNotEnumerable(Promise, 'withResolvers');
verifyWritable(Promise, 'withResolvers');
verifyConfigurable(Promise, 'withResolvers');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants