blob: 4f6a112c45cb7b4b5ee8d5b8e35a95d5c719abac (
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
28
|
// 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]].
features: [async-iteration]
---*/
function* g() {
}
async function* asyncg() {
yield* g();
}
var result = asyncg().next();
assert(result instanceof Promise)
reportCompare(0, 0);
|