tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

resolvers.js (795B)


      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 return value has properties called "resolve" and "reject" which are unary functions
      6 esid: sec-promise.withresolvers
      7 features: [promise-with-resolvers]
      8 ---*/
      9 
     10 
     11 var instance = Promise.withResolvers();
     12 
     13 assert.sameValue(typeof instance.resolve, 'function', 'type of resolve property');
     14 assert.sameValue(instance.resolve.name, "");
     15 assert.sameValue(instance.resolve.length, 1, 'length of resolve property');
     16 assert.sameValue(typeof instance.reject, 'function', 'type of reject property');
     17 assert.sameValue(instance.reject.name, "");
     18 assert.sameValue(instance.reject.length, 1, 'length of reject property');
     19 
     20 reportCompare(0, 0);