Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

solution #641

wants to merge 1 commit into from

Conversation

indigo04
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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! ✨

Comment on lines +11 to +12
test('should return 0 if age is less than 15', () => {
expect(getHumanAge(3, 3)).toEqual([0, 0]);

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.

Comment on lines +15 to +16
test('should return 1 if age is 15', () => {
expect(getHumanAge(15, 15)).toEqual([1, 1]);

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.

Comment on lines +19 to +20
test('should return 2 if age is 24', () => {
expect(getHumanAge(24, 24)).toEqual([2, 2]);

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.

Comment on lines +23 to +24
test('should return [3, 2] if age is 28', () => {
expect(getHumanAge(28, 28)).toEqual([3, 2]);

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.

Comment on lines +27 to +28
test('should return [3, 3] if age is 29', () => {
expect(getHumanAge(29, 29)).toEqual([3, 3]);

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants