result.js (844B)
1 // Copyright (C) 2023 Peter Klecha. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: Promise.withResolvers result is an object with keys "promise", "reject", and "resolve" 6 esid: sec-promise.withresolvers 7 includes: [propertyHelper.js] 8 features: [promise-with-resolvers] 9 ---*/ 10 11 12 var instance = Promise.withResolvers(); 13 14 assert.sameValue(typeof instance, "object"); 15 assert.notSameValue(instance, null); 16 assert(instance instanceof Object); 17 18 verifyProperty(instance, "promise", { 19 writable: true, 20 configurable: true, 21 enumerable: true, 22 }) 23 24 verifyProperty(instance, "resolve", { 25 writable: true, 26 configurable: true, 27 enumerable: true, 28 }) 29 30 verifyProperty(instance, "reject", { 31 writable: true, 32 configurable: true, 33 enumerable: true, 34 }) 35 36 reportCompare(0, 0);