Skip to content

Commit 898abfc

Browse files
committed
passed the test for contains of an array of length returns true.
1 parent ef820ad commit 898abfc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Sprint-2/implement/contains.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ test("contains on object with non-existent property returns false", () => {
4444
test("contains on an array returns false", () => {
4545
expect(contains([1, 2, 3], 4)).toBe(false);
4646
});
47+
48+
test("contains on an array of length returns true", () => {
49+
expect(contains([1, 2, 3, 4], "length")).toBe(true);
50+
}); // the test returns true because 'length' is a property of the array object

0 commit comments

Comments
 (0)