Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/async-super-call-body.js

raw
1 // Copyright 2016 Microsoft, Inc. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 author: Brian Terlson <[email protected]>
6 esid: pending
7 description: >
8 Super calls work in body of async methods
9 flags: [async]
10 ---*/
11
12 var sup = {
13 method() {
14 return 'sup';
15 }
16 }
17
18 var child = {
19 async method() {
20 var x = await super.method();
21 assert.sameValue(x, 'sup');
22 }
23 }
24
25 Object.setPrototypeOf(child, sup);
26
27 child.method().then($DONE, $DONE);