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

[backend] Add tests for observable syntax regex pattern (#5045) #5127

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

marieflorescontact
Copy link
Member

@marieflorescontact marieflorescontact commented Dec 6, 2023

Proposed changes

  • Add tests for observable syntax regex pattern

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@marieflorescontact marieflorescontact self-assigned this Dec 6, 2023
@marieflorescontact marieflorescontact added the filigran team use to identify PR from the Filigran team label Dec 6, 2023
Copy link
Member

@aHenryJard aHenryJard left a comment

Choose a reason for hiding this comment

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

Looks good to me, that's a good starting point anyway.


it('should match a valid email pattern', () => {
expect('test@example.com').toMatch(emailChecker);
expect('invalid_email').not.toMatch(emailChecker);
Copy link
Member

@aHenryJard aHenryJard Dec 6, 2023

Choose a reason for hiding this comment

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

suggestion: Add the email alias with + such as: mastodon+ada.lovelace@mymail.org

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
expect('invalid_email').not.toMatch(emailChecker);
expect('mastodon+ada.lovelace@mymail.org').toMatch(emailChecker);

@marieflorescontact marieflorescontact merged commit 29cb533 into master Dec 6, 2023
6 checks passed
@marieflorescontact marieflorescontact deleted the issue/5045 branch December 6, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants