From b025e4805595b824ca714888ff82ae226faaafe0 Mon Sep 17 00:00:00 2001 From: RedViperPT <40699748+RedViperPT@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:36:53 +0000 Subject: [PATCH 1/2] Improve testing to ensure solution matches expected behaviour --- 05_sumAll/sumAll.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05_sumAll/sumAll.spec.js b/05_sumAll/sumAll.spec.js index fd4a432..be810a6 100644 --- a/05_sumAll/sumAll.spec.js +++ b/05_sumAll/sumAll.spec.js @@ -2,7 +2,7 @@ const sumAll = require('./sumAll') describe('sumAll', () => { test('sums numbers within the range', () => { - expect(sumAll(1, 4)).toEqual(10); + expect(sumAll(2, 4)).toEqual(9); }); test.skip('works with large numbers', () => { expect(sumAll(1, 4000)).toEqual(8002000); From b92866af313d3591782bf6f58107d548b371b4e6 Mon Sep 17 00:00:00 2001 From: RedViperPT <40699748+RedViperPT@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:55:05 +0000 Subject: [PATCH 2/2] Update the tests for the solutions --- 05_sumAll/solution/sumAll-solution.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05_sumAll/solution/sumAll-solution.spec.js b/05_sumAll/solution/sumAll-solution.spec.js index c78ae4e..3afdf4e 100644 --- a/05_sumAll/solution/sumAll-solution.spec.js +++ b/05_sumAll/solution/sumAll-solution.spec.js @@ -2,7 +2,7 @@ const sumAll = require('./sumAll-solution'); describe('sumAll', () => { test('sums numbers within the range', () => { - expect(sumAll(1, 4)).toEqual(10); + expect(sumAll(2, 4)).toEqual(9); }); test('works with large numbers', () => { expect(sumAll(1, 4000)).toEqual(8002000);