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 #613

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

Solution #613

wants to merge 1 commit into from

Conversation

Clyacsa
Copy link

@Clyacsa Clyacsa commented Nov 15, 2024

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! 🎉 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! ✨

Comment on lines +12 to +14
const result = getHumanAge(2, 3);

expect(result).toHaveLength(2);

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.

Comment on lines +18 to +20
const result = getHumanAge;

expect(Array.isArray(result));

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);.

Comment on lines +29 to +33
test('should have expected values bv1', () => {
const result = getHumanAge(5, 5);

expect(result).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 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.

Comment on lines +35 to +45
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]);
});

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.

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