tor-browser

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

await-awaits-thenable-not-callable.js (460B)


      1 // |reftest| module async
      2 // Copyright 2019 Leo Balter. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: prod-AwaitExpression
      7 description: >
      8  Await can await any thenable. If the thenable's then is not callable,
      9  await evaluates to the thenable
     10 flags: [module, async]
     11 features: [top-level-await]
     12 ---*/
     13 
     14 var thenable = { then: 42 };
     15 var res = await thenable;
     16 assert.sameValue(res, thenable);
     17 
     18 $DONE();