]> Lady’s Gitweb - Pisces/blobdiff - iterable.test.js
Add methods for own entries and values to object.js
[Pisces] / iterable.test.js
index 2e62d5c01146ac9e5e10f2dd1b1b700174501833..0f7c9fcac0a96447695e0d0dd387df808c586f08 100644 (file)
@@ -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(
This page took 0.025884 seconds and 4 git commands to generate.