Skip to content

Commit bff94a8

Browse files
Apply changes commented by the reviewer
1 parent 3db21bf commit bff94a8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sprint-1/implement/dedupe.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("dedupe", () => {
3030
it(
3131
"returns a copy of original array when passed array with no duplicates ",
3232
() => expect(dedupe(input)).toEqual(expected),
33-
expect(dedupe(input)).not.toBe(expected)
33+
expect(dedupe(input)).not.toBe(input)
3434
)
3535
);
3636

Sprint-1/implement/sum.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("sum()", () => {
1919
{ input: [7958463], expected: 7958463 },
2020
].forEach(({ input, expected }) => {
2121
it(`returns the sum for arrays with one number`, () =>
22-
expect(sum(input)).toBeCloseTo(expected));
22+
expect(sum(input)).toEqual(expected));
2323
});
2424

2525
[
@@ -28,7 +28,7 @@ describe("sum()", () => {
2828
{ input: [-7958463, -100, -202, -6453], expected: -7965218 },
2929
].forEach(({ input, expected }) =>
3030
it("returns the correct sum for array with only negative values", () =>
31-
expect(sum(input)).toBeCloseTo(expected))
31+
expect(sum(input)).toEqual(expected))
3232
);
3333

3434
[
@@ -37,7 +37,7 @@ describe("sum()", () => {
3737
{ input: [-7958463, -100, -202, -6453, 153, 45621], expected: -7919444 },
3838
].forEach(({ input, expected }) =>
3939
it("returns the correct sum for array containing negative numbers", () =>
40-
expect(sum(input)).toBeCloseTo(expected))
40+
expect(sum(input)).toEqual(expected))
4141
);
4242

4343
[
@@ -88,6 +88,6 @@ describe("sum()", () => {
8888
[("apple", null, undefined)],
8989
].forEach((item) =>
9090
it("returns 0 for arrays with only non-number values", () =>
91-
expect(sum(item)).toBeCloseTo(0))
91+
expect(sum(item)).toEqual(0))
9292
);
9393
});

0 commit comments

Comments
 (0)