mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
address comments
This commit is contained in:
parent
2a4c458002
commit
1db9a49eb9
@ -19,14 +19,14 @@ assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call(86);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call('string');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call(true);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call(Symbol());
|
||||
});
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call('string');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call(true);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Promise.withResolvers.call(Symbol());
|
||||
});
|
||||
|
@ -4,7 +4,8 @@
|
||||
/*---
|
||||
description: Promise.withResolvers result is an object with keys "promise", "reject", and "resolve"
|
||||
esid: sec-promise.withresolvers
|
||||
features: [promise-with-resolvers, Object.hasOwn]
|
||||
includes: [propertyHelper.js]
|
||||
features: [promise-with-resolvers]
|
||||
---*/
|
||||
|
||||
|
||||
@ -13,7 +14,21 @@ var instance = Promise.withResolvers();
|
||||
assert.sameValue(typeof instance, "object");
|
||||
assert.notSameValue(instance, null);
|
||||
assert(instance instanceof Object);
|
||||
assert(Object.hasOwn(instance, "promise"));
|
||||
assert(Object.hasOwn(instance, "resolve"));
|
||||
assert(Object.hasOwn(instance, "reject"));
|
||||
|
||||
verifyProperty(instance, "promise", {
|
||||
writable: true,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
})
|
||||
|
||||
verifyProperty(instance, "resolve", {
|
||||
writable: true,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
})
|
||||
|
||||
verifyProperty(instance, "reject", {
|
||||
writable: true,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user