We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57fab61 commit 5f43729Copy full SHA for 5f43729
1 file changed
Sprint-2/implement/contains.test.js
@@ -45,8 +45,9 @@ test("given an object with properties, returns false when passed to contains wit
45
// Given invalid parameters like an array
46
// When passed to contains
47
// 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
49
test("given invalid parameters (array), returns false or throws an error", () => {
- expect(contains(["gitName", "age", "position"], "cohort")).toEqual(false);
50
+ expect(contains(["gitName", "age", "position"], "length")).toBe(false);
51
});
52
53
test("given invalid parameters (like null or undefined), returns false or throws an error", () => {
0 commit comments