blob: 8a0606870a629ae8938459c0aa54e5ae168aab40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright (C) 2023 Peter Klecha. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Promise.withResolvers return value has properties called "resolve" and "reject" which are unary functions
esid: sec-promise.withresolvers
features: [promise-with-resolvers]
---*/
var instance = Promise.withResolvers();
assert.sameValue(typeof instance.resolve, 'function', 'type of resolve property');
assert.sameValue(instance.resolve.length, 1, 'length of resolve property');
assert.sameValue(typeof instance.reject, 'function', 'type of reject property');
assert.sameValue(instance.reject.length, 1, 'length of reject property');
reportCompare(0, 0);
|