Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: test/test262/local-tests/test/language/expressions/async-generators/expression-await-as-yield-operand.js

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: Fix minor parsing bug, add some local test262 tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 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 author: Caitlin Potter <caitp@igalia.com>
6 esid: 14.4
7 description: >
8 AwaitExpressions are valid operands to yield expressions.
9 flags: [async]
10 ---*/
11
12 var iter = (async function*() {
13 yield await "a";
14 })();
15
16 iter.next().then(function(result) {
17 assert.sameValue(result.value, "a", 'First result `value`');
18 assert.sameValue(result.done, false, 'First result `done` flag');
19 }, $DONE);
20
21 iter.next().then(function(result) {
22 assert.sameValue(result.value, undefined, 'Second result `value`');
23 assert.sameValue(result.done, true, 'Second result `done` flag');
24 $DONE();
25 }, $DONE);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698