mirror of https://github.com/tc39/test262.git
18 lines
533 B
JavaScript
18 lines
533 B
JavaScript
|
// Copyright (C) 2023 Peter Klecha. All rights reserved.
|
||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||
|
|
||
|
/*---
|
||
|
description: Promise.withResolvers result is an object with keys "promise", "reject", and "resolve"
|
||
|
features: [promise-with-resolvers]
|
||
|
---*/
|
||
|
|
||
|
|
||
|
var instance = Promise.withResolvers();
|
||
|
|
||
|
assert.sameValue(typeof instance, "object");
|
||
|
assert.notSameValue(instance, null);
|
||
|
assert(Object.hasOwn(instance, "promise"));
|
||
|
assert(Object.hasOwn(instance, "resolve"));
|
||
|
assert(Object.hasOwn(instance, "reject"));
|
||
|
|