Debian Codegraph @

js/src/tests/test262/language/module-code/top-level-await/await-awaits-thenables.js

raw
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.
9 flags: [module, async]
10 features: [top-level-await]
11 ---*/
12
13 var thenable = {
14 then: function (resolve, reject) {
15 resolve(42);
16 }
17 }
18
19 assert.sameValue(await thenable, 42);
20
21 $DONE();