Skip to content

Commit c6e8c0c

Browse files
committed
test(contains): use 'length' property to reliably reject arrays
1 parent 608badb commit c6e8c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-2/implement/contains.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test("contains returns false when the property is not present", () => {
6464

6565
// Handles invalid inputs gracefully
6666
test("contains handles invalid parameters", () => {
67-
expect(contains([], "a")).toBe(false);
67+
expect(contains([], "length")).toBe(false);
6868
expect(contains(null, "a")).toBe(false);
6969
expect(contains(undefined, "a")).toBe(false);
7070
});

0 commit comments

Comments
 (0)