Skip to content

Solution#236

Open
viktoriamyhailiak wants to merge 1 commit intomate-academy:masterfrom
viktoriamyhailiak:develop
Open

Solution#236
viktoriamyhailiak wants to merge 1 commit intomate-academy:masterfrom
viktoriamyhailiak:develop

Conversation

@viktoriamyhailiak
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 tests for the ifElse function! Your submission meets all the core requirements. The tests are well-structured, clear, and correctly verify the function's behavior for boolean true and false conditions. As a suggestion for future improvement, you could consider adding tests for other 'truthy' values (like 1 or 'hello') to make the suite even more robust, but this is not required for approval. I am approving your solution.


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

Footnotes

  1. Rate AI review example

expect(result).toBe(1);
});

it(`should call second if condition is false`, () => {

Choose a reason for hiding this comment

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

This is a good test for the false condition. To make the tests more robust, consider adding another test case for when the condition returns a 'truthy' value that is not strictly true (e.g., 1 or 'hello'). This will verify that the second callback is correctly called for any value other than true, which is how the current implementation behaves.

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