summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/async-generator/expression-yield-star-before-newline.js
blob: f5511e44cff4244bd70ddc0186bfcb3d9aca421f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |reftest| async
// Copyright 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
  The right-hand side of a `yield *` expression may appear on a new line.
flags: [async]
features: [async-iteration]
---*/

var g = async function*() {};

(async function*() {
  yield*
  g();
})().next().then(function(result) {
  assert.sameValue(result.value, undefined);
  assert.sameValue(result.done, true);
}).then($DONE, $DONE);