Skip to content

Added task solution#170

Open
nikitachupahin wants to merge 1 commit intomate-academy:mainfrom
nikitachupahin:develop
Open

Added task solution#170
nikitachupahin wants to merge 1 commit intomate-academy:mainfrom
nikitachupahin:develop

Conversation

@nikitachupahin
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.

Review Summary

Excellent work on the test suite for the arrayReverse function! I am approving your solution as you've successfully covered all the requirements from the description, including the specific examples and edge cases.

I have one small suggestion to make your tests a bit more efficient. In src/arrayReverse.test.js, you call the arrayReverse function twice with the same arguments. A common practice is to call it once, save the result to a variable, and then perform all your checks on that variable, which makes the test more efficient and readable.

For example:

const result = arrayReverse(['Mate', 'Academy']);
expect(result).toHaveLength(2);
expect(result).toEqual(['ymed', 'acAetaM']);

This is just a minor tip for future reference. Great job, and keep up the fantastic work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment on lines +11 to +12
expect(arrayReverse(['Mate', 'Academy'])).toBeInstanceOf(Array);
expect(arrayReverse(['Mate', 'Academy'])).toHaveLength(2);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are good assertions! However, you are calling the arrayReverse function twice here with the same arguments. It's a better practice to call the function only once, save its result to a variable, and then perform all your checks on that variable. This makes the test more efficient and often easier to read.

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