blob: d3bb1be2f4d54a20c93461dbf76ca6d6c199b848 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2018 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-%asyncfromsynciteratorprototype%.next
description: >
"next" returns a promise for an IteratorResult object
info: |
%AsyncFromSyncIteratorPrototype%.next ( value )
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
...
18. Return promiseCapability.[[Promise]].
flags: [async]
features: [async-iteration]
---*/
function* g() {
}
async function* asyncg() {
yield* g();
}
var result = asyncg().next();
assert(result instanceof Promise)
|