You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues to ensure this improvement hasn't been suggested before (please have a look through our open issues list to make sure)
The title of this issue follows the <Location of the improvement>: <Brief description of the improvement> format, e.g. Exercises: Add exercise on XYZ
(Optional) I am interested in working on this issue and would like to be assigned to it
Improvement Description
While working through the exercise, I noticed that the tests don't check if you're actually adding the numbers between two arbitrary positive integers. It's possible to write a program that just adds all the numbers up to the biggest value given and still pass the tests.
test('sums numbers within the range', () => {
expect(sumAll(1, 4)).toEqual(10);
});
test('works with large numbers', () => {
expect(sumAll(1, 4000)).toEqual(8002000);
});
test('works with larger number first', () => {
expect(sumAll(123, 1)).toEqual(7626);
});
Since all the tests start at 1 you can skip part of the exercise by just finding the biggest value.
This should be easy to fix by either modifying one of the tests or adding a new one.
Acceptance Criteria
Test verify user is adding between the two given numbers.
(Optional) Additional Comments
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
<Location of the improvement>: <Brief description of the improvement>
format, e.g.Exercises: Add exercise on XYZ
Improvement Description
While working through the exercise, I noticed that the tests don't check if you're actually adding the numbers between two arbitrary positive integers. It's possible to write a program that just adds all the numbers up to the biggest value given and still pass the tests.
Since all the tests start at 1 you can skip part of the exercise by just finding the biggest value.
This should be easy to fix by either modifying one of the tests or adding a new one.
Acceptance Criteria
(Optional) Additional Comments
No response
The text was updated successfully, but these errors were encountered: