js_split_integer #1094
Conversation
Fix linter error in the task file
Feature/prettier
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The request meets the required criteria for approval.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| test(`should split a number into equal parts | ||
| if a value is divisible by a numberOfParts`, () => { | ||
|
|
||
| }); | ||
| if a value is divisible by a numberOfParts`, () => {}); |
There was a problem hiding this comment.
Empty test body - need to add assertions. For example: expect(splitInteger(8, 1)).toEqual([8]);
| test(`should return a part equals to a value | ||
| when splitting into 1 part`, () => { | ||
|
|
||
| }); | ||
|
|
||
| test('should sort parts ascending if they are not equal', () => { | ||
|
|
||
| }); | ||
| when splitting into 1 part`, () => {}); |
There was a problem hiding this comment.
Empty test body - need to add assertions. For example: expect(splitInteger(6, 2)).toEqual([3, 3]);
| when splitting into 1 part`, () => {}); | ||
|
|
||
| test('should add zeros if value < numberOfParts', () => { | ||
| test('should sort parts ascending if they are not equal', () => {}); |
There was a problem hiding this comment.
Empty test body - need to add assertions to verify the array is sorted ascending and max-min <= 1. For example: expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]);
| test('should sort parts ascending if they are not equal', () => {}); | ||
|
|
||
| }); | ||
| test('should add zeros if value < numberOfParts', () => {}); |
There was a problem hiding this comment.
Empty test body - need to add assertions. When value < numberOfParts, the function should still return exactly numberOfParts elements (with zeros for remaining parts). For example: expect(splitInteger(3, 5)).toEqual([0, 0, 1, 1, 1]);
| }, | ||
| rules: { |
There was a problem hiding this comment.
This test body is empty. Add expectations like expect(splitInteger(6, 2)).toEqual([3, 3]) to verify equal splitting behavior.
| }, | ||
| plugins: ['jest'] |
There was a problem hiding this comment.
This test body is empty. Add an expectation such as expect(splitInteger(8, 1)).toEqual([8]) to verify single-part behavior.
| branches: [ main ] | ||
|
|
There was a problem hiding this comment.
This test body is empty. Add assertions using expect() to verify the function returns equal parts when divisible. For example: expect(splitInteger(6, 2)).toEqual([3, 3])
| @@ -11,7 +11,7 @@ jobs: | |||
|
|
|||
There was a problem hiding this comment.
This test body is empty. Add assertions to verify the array is sorted in ascending order. For example: expect(splitInteger(17, 4)).toEqual([4, 4, 4, 5]) - note the values are already ascending.
| @@ -11,7 +11,7 @@ jobs: | |||
|
|
|||
| strategy: | |||
| matrix: | |||
There was a problem hiding this comment.
This test body is empty. Add assertions to verify the function handles cases where value < numberOfParts (should add zeros). For example: splitInteger(2, 5) should return [0, 0, 0, 1, 1].
js_split_integer