From 6ea9327556eca208b4878f574f7a018bb8c5915b Mon Sep 17 00:00:00 2001 From: Nikhil Dewoolkar Date: Wed, 11 Oct 2023 22:40:06 +0530 Subject: [PATCH] test case for usermention --- __tests__/ExpensiMark-HTML-test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/__tests__/ExpensiMark-HTML-test.js b/__tests__/ExpensiMark-HTML-test.js index f6a6d3970..9187ceb1b 100644 --- a/__tests__/ExpensiMark-HTML-test.js +++ b/__tests__/ExpensiMark-HTML-test.js @@ -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('Example Link'); }); + +test('Mention', () => { + let testString = '@user@domain.com'; + expect(parser.replace(testString)).toBe('@user@domain.com'); + + testString = '@USER@DOMAIN.COM'; + expect(parser.replace(testString)).toBe('@user@domain.com'); + + testString = '@USER@domain.com'; + expect(parser.replace(testString)).toBe('@user@domain.com'); + + testString = '@user@DOMAIN.com'; + expect(parser.replace(testString)).toBe('@user@domain.com'); + + testString = '@user@DOMAIN.com'; + expect(parser.replace(testString)).toBe('@user@domain.com'); +});