From 499d8698a75f24e2493f12f77ef13018edf09817 Mon Sep 17 00:00:00 2001 From: Nikhil Dewoolkar Date: Thu, 2 Nov 2023 19:52:35 +0530 Subject: [PATCH] tests for htmltomarkdown for usermentions --- __tests__/ExpensiMark-Markdown-test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/__tests__/ExpensiMark-Markdown-test.js b/__tests__/ExpensiMark-Markdown-test.js index 56624cec..8806790f 100644 --- a/__tests__/ExpensiMark-Markdown-test.js +++ b/__tests__/ExpensiMark-Markdown-test.js @@ -690,3 +690,17 @@ test('Test codeFence copy from selection does not add extra new line', () => { testString = '

test heading

Code snippet\n

link

'; expect(parser.htmlToMarkdown(testString)).toBe('test heading\n```\nCode snippet\n```\n> [link](https://www.example.com)') }); + +test('Mention html to markdown', () => { + let testString = '@user@domain.com'; + expect(parser.htmlToMarkdown(testString)).toBe('@user@domain.com'); + + testString = '@USER@DOMAIN.COM'; + expect(parser.htmlToMarkdown(testString)).toBe('@USER@DOMAIN.COM'); + + testString = '@USER@domain.com'; + expect(parser.htmlToMarkdown(testString)).toBe('@USER@domain.com'); + + testString = '@user@DOMAIN.com'; + expect(parser.htmlToMarkdown(testString)).toBe('@user@DOMAIN.com'); +});