mirror of
https://github.com/tc39/test262.git
synced 2025-05-04 15:00:42 +02:00
12 lines
310 B
JavaScript
12 lines
310 B
JavaScript
function shouldBe(actual, expected) {
|
|
if (actual !== expected)
|
|
throw new Error('bad value: ' + actual);
|
|
}
|
|
|
|
function* generator() { }
|
|
|
|
var GeneratorPrototype = Object.getPrototypeOf(generator).prototype;
|
|
generator.prototype = null;
|
|
|
|
shouldBe(Object.getPrototypeOf(generator()), GeneratorPrototype);
|