Skip to content

Commit

Permalink
test case for usermention
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhildewoolkar authored Oct 11, 2023
1 parent 27a5807 commit 6ea9327
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions __tests__/ExpensiMark-HTML-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1389,3 +1389,20 @@ test('Test strikethrough with link with URL that contains tilde', () => {
testString = '~[Example Link](https://example.com/?~example=~~~ex~)~';
expect(parser.replace(testString)).toBe('<del><a href="https://example.com/?~example=~~~ex~" target="_blank" rel="noreferrer noopener">Example Link</a></del>');
});

test('Mention', () => {
let testString = '@user@domain.com';
expect(parser.replace(testString)).toBe('<mention-user>@user@domain.com</mention-user>');

testString = '@USER@DOMAIN.COM';
expect(parser.replace(testString)).toBe('<mention-user>@user@domain.com</mention-user>');

testString = '@USER@domain.com';
expect(parser.replace(testString)).toBe('<mention-user>@user@domain.com</mention-user>');

testString = '@user@DOMAIN.com';
expect(parser.replace(testString)).toBe('<mention-user>@user@domain.com</mention-user>');

testString = '@user@DOMAIN.com';
expect(parser.replace(testString)).toBe('<mention-user>@user@domain.com</mention-user>');
});

0 comments on commit 6ea9327

Please sign in to comment.