v8/test/mjsunit/harmony/symbol-async-iterator.js
caitp 498084222a [async-iteration] expose Symbol.asyncIterator behind flag --harmony-async-iteration
Flag is used by followup patches split apart from
https://codereview.chromium.org/2622833002/, and tests for each split
out CL ends up using Symbol.asyncIterator, so it makes sense to land it
first (behind a flag).

BUG=v8:5855
R=littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/2645923003
Cr-Commit-Position: refs/heads/master@{#42527}
2017-01-20 00:42:09 +00:00

15 lines
526 B
JavaScript

// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-async-iteration
assertTrue(Symbol.hasOwnProperty('asyncIterator'));
assertEquals('symbol', typeof Symbol.asyncIterator);
assertInstanceof(Object(Symbol.asyncIterator), Symbol);
let desc = Object.getOwnPropertyDescriptor(Symbol, 'asyncIterator');
assertFalse(desc.writable);
assertFalse(desc.enumerable);
assertFalse(desc.configurable);