Skip to content

Commit 8e4807e

Browse files
committed
Test case description updated
1 parent 2528d55 commit 8e4807e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Sprint-2/implement/contains.test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ test("Should return false when object does not have the property", () => {
5252
// When passed to contains
5353
// Then it should return false or throw an error
5454

55-
test("Should return false when invalid parameters are used", () => {
55+
test("Should correctly detect keys in arrays", () => {
5656
expect(contains([1, 2, 3], "1")).toEqual(true); // "1" is a key
5757
expect(contains([1, 2, 3], "3")).toEqual(false); // "3" is not a key
58-
//expect(contains([], "a")).toEqual(false); // array
59-
expect(contains(null, "a")).toEqual(false); // null
58+
});
59+
60+
test("Should return false when invalid parameters are used", () => {
61+
expect(contains(null, "a")).toEqual(false); // null
6062
expect(contains(5, "a")).toEqual(false); // number
6163
expect(contains("hello", "a")).toEqual(false); // string
6264
})
6365

6466
// In contains.test.js tests for contains.test.js passed
6567

66-
// contains.test.js re-tested.
68+
// contains.test.js re-tested.
69+
70+
// test case description differentiated.

0 commit comments

Comments
 (0)