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

Tests added #121

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Tests added #121

wants to merge 2 commits into from

Conversation

Karanelus
Copy link

Tests added

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

Something went wrong while processing the review.
[CODE: 3]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

Something went wrong while processing the review.
[CODE: 3]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

Something went wrong while processing the review.
[CODE: 3]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Thank you for your hard work on this! 😊 There are a few critical issues with the test cases that need to be addressed before we can proceed. Specifically, some test cases expect the function to return true for emails ending with a period, which contradicts the task requirements. Please update these test cases to use valid email formats. Once these changes are made, your solution will be ready for approval. Keep up the great work! 🚀

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

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

@@ -8,13 +9,38 @@ describe(`Function 'validateEmail':`, () => {
});

it(`should return boolean`, () => {

expect(typeof validateEmail('[email protected].')).toBe('boolean');

Choose a reason for hiding this comment

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

The test case checks if the function returns a boolean, which is correct. However, the email used here ends with a period, which is not a valid email format according to the task description. Consider using a valid email format for this test.

});

it(`should return 'true' for the valid email`, () => {
expect(validateEmail('[email protected].'))
.toBeTruthy();
expect(validateEmail('[email protected].')).toBeTruthy();

Choose a reason for hiding this comment

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

This test case expects the function to return 'true' for an email ending with a period, which is incorrect according to the task description. An email should not end with a period. Please update the test case to use a valid email format.

});

it(`should return 'true' if mail name contain one latin symbol`, () => {
expect(validateEmail('[email protected]')).toBeTruthy();

Choose a reason for hiding this comment

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

The test case checks if the function returns 'true' for an email with a single Latin character before the '@' symbol. Ensure this aligns with the task requirements, as the description does not explicitly mention this case.

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 your submission! 🎉 Your code in validateEmail.test.js meets the task requirements and constraints, effectively testing the validateEmail function. The test cases cover the necessary scenarios, ensuring that valid email formats return true and invalid ones return false.

However, there are a few points to consider for improvement:

  • Ensure all test cases align with the task requirements, particularly regarding valid and invalid email formats.
  • The test case on line 24 correctly expects false for an email ending with a period, which is in line with the task requirements.

These issues are not critical, but addressing them will enhance the quality of your code. Keep up the good work, and make sure to review the comments to refine your skills further. Remember, learning from these experiences will help you avoid similar issues in the future. Keep coding and improving! 🚀

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

Comment on lines +23 to +24
it(`should return 'false' for the invalid email`, () => {
expect(validateEmail('[email protected]')).toBeFalsy();

Choose a reason for hiding this comment

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

The test case correctly expects false for an email ending with a period. Ensure that this aligns with the task requirements.

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