Skip to content

Commit 5f43729

Browse files
committed
udated the array input test
1 parent 57fab61 commit 5f43729

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sprint-2/implement/contains.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ test("given an object with properties, returns false when passed to contains wit
4545
// Given invalid parameters like an array
4646
// When passed to contains
4747
// Then it should return false or throw an error
48+
// "length" is perfect for the test because it's real property on the array itself
4849
test("given invalid parameters (array), returns false or throws an error", () => {
49-
expect(contains(["gitName", "age", "position"], "cohort")).toEqual(false);
50+
expect(contains(["gitName", "age", "position"], "length")).toBe(false);
5051
});
5152

5253
test("given invalid parameters (like null or undefined), returns false or throws an error", () => {

0 commit comments

Comments
 (0)