tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

generator-no-yield.js (467B)


      1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: >
      6    Generators declared with GeneratorMethod syntax do not require a
      7    `yield` expression.
      8 features: [generators]
      9 es6id: 14.4
     10 ---*/
     11 
     12 var result;
     13 var obj = {
     14  *foo(a) {}
     15 };
     16 
     17 result = obj.foo(3).next();
     18 
     19 assert.sameValue(result.value, undefined);
     20 assert.sameValue(result.done, true);
     21 
     22 reportCompare(0, 0);