-
Notifications
You must be signed in to change notification settings - Fork 651
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 #641
base: main
Are you sure you want to change the base?
solution #641
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 and its corresponding tests! 🎉 The tests are well-structured and cover a variety of scenarios, ensuring robust validation of the function's logic. While there are suggestions to verify the expected outputs against the function's logic, your code meets the task requirements and constraints. Keep up the excellent work, and consider reviewing the test cases to ensure they align perfectly with the intended logic of your function. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
test('should return 0 if age is less than 15', () => { | ||
expect(getHumanAge(3, 3)).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 expects getHumanAge(3, 3)
to return [0, 0]
. Ensure that the getHumanAge
function is designed to return [0, 0]
for ages less than 15. If the logic in getHumanAge
differs, this test case might need adjustment.
test('should return 1 if age is 15', () => { | ||
expect(getHumanAge(15, 15)).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 expects getHumanAge(15, 15)
to return [1, 1]
. Verify that the getHumanAge
function is intended to return [1, 1]
for age 15. Adjust the test case if the function's logic is different.
test('should return 2 if age is 24', () => { | ||
expect(getHumanAge(24, 24)).toEqual([2, 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 expects getHumanAge(24, 24)
to return [2, 2]
. Confirm that this aligns with the logic implemented in getHumanAge
. If not, the test case might need to be updated.
test('should return [3, 2] if age is 28', () => { | ||
expect(getHumanAge(28, 28)).toEqual([3, 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 expects getHumanAge(28, 28)
to return [3, 2]
. Ensure that the getHumanAge
function's logic supports this expected output. If the logic is different, consider revising the test case.
test('should return [3, 3] if age is 29', () => { | ||
expect(getHumanAge(29, 29)).toEqual([3, 3]); |
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 expects getHumanAge(29, 29)
to return [3, 3]
. Verify that this matches the intended logic of the getHumanAge
function. Adjust the test case if necessary.
No description provided.