Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/src/dstr-binding/default/async-gen-func-named-expr.template

raw
1 // Copyright (C) 2017 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 path: language/expressions/async-generator/dstr-named-
6 name: async generator named function expression
7 esid: sec-asyncgenerator-definitions-evaluation
8 features: [async-iteration]
9 info: |
10 AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
11 ( FormalParameters ) { AsyncGeneratorBody }
12
13 [...]
14 7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
15 AsyncGeneratorBody, funcEnv, strict).
16 [...]
17 flags: [async]
18 ---*/
19
20 var callCount = 0;
21 var f;
22 f = async function* h(/*{ elems }*/) {
23 /*{ body }*/
24 callCount = callCount + 1;
25 };
26
27 f(/*{ vals }*/).next().then(() => {
28 assert.sameValue(callCount, 1, 'invoked exactly once');
29 }).then($DONE, $DONE);