utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 1 | function shouldBe(actual, expected) { |
2 | if (actual !== expected) | ||||
3 | throw new Error('bad value: ' + actual); | ||||
4 | } | ||||
5 | var global = (new Function("return this"))(); | ||||
6 | shouldBe(typeof global.GeneratorFunction, 'undefined'); | ||||
7 | var generatorFunctionConstructor = (function *() { }).constructor; | ||||
8 | shouldBe(generatorFunctionConstructor.__proto__, Function); | ||||
9 | shouldBe(generatorFunctionConstructor.prototype.constructor, generatorFunctionConstructor); |