X-Git-Url: https://git.ladys.computer/Pisces/blobdiff_plain/bf3fe705a9d5f717b3c1794a12726e926ece7ecc..refs/heads/current:/iterable.test.js?ds=sidebyside diff --git a/iterable.test.js b/iterable.test.js index 2e62d5c..0f7c9fc 100644 --- a/iterable.test.js +++ b/iterable.test.js @@ -34,6 +34,25 @@ describe("arrayIteratorFunction", () => { ); }); + it("[[Construct]] throws an error", () => { + assertThrows(() => new arrayIteratorFunction()); + }); + + describe(".length", () => { + it("[[Get]] returns the correct length", () => { + assertStrictEquals(arrayIteratorFunction.length, 1); + }); + }); + + describe(".name", () => { + it("[[Get]] returns the correct name", () => { + assertStrictEquals( + arrayIteratorFunction.name, + "arrayIteratorFunction", + ); + }); + }); + describe("()", () => { it("[[Call]] returns a value which inherits from %IteratorPrototype%", () => { const iteratorProto = Object.getPrototypeOf( @@ -130,6 +149,25 @@ describe("generatorIteratorFunction", () => { ); }); + it("[[Construct]] throws an error", () => { + assertThrows(() => new generatorIteratorFunction()); + }); + + describe(".length", () => { + it("[[Get]] returns the correct length", () => { + assertStrictEquals(generatorIteratorFunction.length, 1); + }); + }); + + describe(".name", () => { + it("[[Get]] returns the correct name", () => { + assertStrictEquals( + generatorIteratorFunction.name, + "generatorIteratorFunction", + ); + }); + }); + describe("()", () => { it("[[Call]] returns a value which inherits from %IteratorPrototype%", () => { const iteratorProto = Object.getPrototypeOf( @@ -248,6 +286,25 @@ describe("mapIteratorFunction", () => { ); }); + it("[[Construct]] throws an error", () => { + assertThrows(() => new mapIteratorFunction()); + }); + + describe(".length", () => { + it("[[Get]] returns the correct length", () => { + assertStrictEquals(mapIteratorFunction.length, 1); + }); + }); + + describe(".name", () => { + it("[[Get]] returns the correct name", () => { + assertStrictEquals( + mapIteratorFunction.name, + "mapIteratorFunction", + ); + }); + }); + describe("()", () => { it("[[Call]] returns a value which inherits from %IteratorPrototype%", () => { const iteratorProto = Object.getPrototypeOf( @@ -344,6 +401,25 @@ describe("setIteratorFunction", () => { ); }); + it("[[Construct]] throws an error", () => { + assertThrows(() => new setIteratorFunction()); + }); + + describe(".length", () => { + it("[[Get]] returns the correct length", () => { + assertStrictEquals(setIteratorFunction.length, 1); + }); + }); + + describe(".name", () => { + it("[[Get]] returns the correct name", () => { + assertStrictEquals( + setIteratorFunction.name, + "setIteratorFunction", + ); + }); + }); + describe("()", () => { it("[[Call]] returns a value which inherits from %IteratorPrototype%", () => { const iteratorProto = Object.getPrototypeOf( @@ -440,6 +516,25 @@ describe("stringIteratorFunction", () => { ); }); + it("[[Construct]] throws an error", () => { + assertThrows(() => new stringIteratorFunction()); + }); + + describe(".length", () => { + it("[[Get]] returns the correct length", () => { + assertStrictEquals(stringIteratorFunction.length, 1); + }); + }); + + describe(".name", () => { + it("[[Get]] returns the correct name", () => { + assertStrictEquals( + stringIteratorFunction.name, + "stringIteratorFunction", + ); + }); + }); + describe("()", () => { it("[[Call]] returns a value which inherits from %IteratorPrototype%", () => { const iteratorProto = Object.getPrototypeOf(