-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #613
base: main
Are you sure you want to change the base?
Solution #613
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on implementing the getHumanAge
function! 🎉 Your solution meets the task requirements and constraints, and the tests are correctly implemented to validate the function's behavior. While there are some minor issues with test descriptions and implementation details, they don't impact the core functionality. Keep up the good work, and consider refining your test descriptions for clarity in future projects. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
const result = getHumanAge(2, 3); | ||
|
||
expect(result).toHaveLength(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test checks if the result has a length of 2, which assumes that getHumanAge
returns an array. Ensure that the function is expected to return an array of length 2 as per the task description.
const result = getHumanAge; | ||
|
||
expect(Array.isArray(result)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test for checking if the result is an array is incorrect. The getHumanAge
function should be called to get the result, and then Array.isArray(result)
should be used in an expectation, like expect(Array.isArray(result)).toBe(true);
.
test('should have expected values bv1', () => { | ||
const result = getHumanAge(5, 5); | ||
|
||
expect(result).toEqual([0, 0]); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test description 'should have expected values bv1' is repeated multiple times. Consider using unique descriptions for each test case to avoid confusion and to better document what each test is verifying.
test('should have expected values bv1', () => { | ||
const result = getHumanAge(15, 15); | ||
|
||
expect(result).toEqual([1, 1]); | ||
}); | ||
|
||
test('should have expected values bv1', () => { | ||
const result = getHumanAge(16, 16); | ||
|
||
expect(result).toEqual([1, 1]); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test cases for expected values seem to follow a pattern, but the descriptions are not unique. Ensure each test case has a unique description to clearly indicate what specific scenario or boundary value it is testing.
No description provided.