+ it("[[Construct]] throws an error", () => {
+ const iterator = generatorIteratorFunction();
+ assertThrows(() => new iterator(function* () {}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(generatorIteratorFunction().length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ generatorIteratorFunction().name,
+ "yields",
+ );
+ });
+ });
+