Skip to content

Commit 8829dde

Browse files
committed
feat(contains): move same reference test to the beginning
1 parent e630a8b commit 8829dde

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

14_contains/solution/contains-solution.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const contains = require("./contains-solution");
22

33
describe("contains", () => {
4-
const meaningOfLifeArray = [42]
4+
const meaningOfLifeArray = [42];
55
const object = {
66
data: {
77
duplicate: "e",
@@ -42,14 +42,14 @@ describe("contains", () => {
4242
expect(contains(object, "e")).toBe(true);
4343
});
4444

45-
test("false if the provided array has the same structure as an array within the object, however the reference is not the same", () => {
46-
expect(contains(object, [42])).toBe(false);
47-
});
48-
4945
test("true if the provided array is a reference to an array that exists within the object", () => {
5046
expect(contains(object, meaningOfLifeArray)).toBe(true);
5147
});
5248

49+
test("false if the provided array has the same structure as an array within the object, however the reference is not the same", () => {
50+
expect(contains(object, [42])).toBe(false);
51+
});
52+
5353
test("true if NaN is a value within the object", () => {
5454
expect(contains(object, NaN)).toBe(true);
5555
});

0 commit comments

Comments
 (0)