Skip to content

Commit

Permalink
tests for htmltomarkdown for usermentions
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhildewoolkar committed Nov 2, 2023
1 parent bd030be commit 499d869
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions __tests__/ExpensiMark-Markdown-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,3 +690,17 @@ test('Test codeFence copy from selection does not add extra new line', () => {
testString = '<h3>test heading</h3><div><pre class=\"notranslate\"><code class=\"notranslate\">Code snippet\n</code></pre></div><blockquote><p><a href=\"https://www.example.com\">link</a></p></blockquote>';
expect(parser.htmlToMarkdown(testString)).toBe('test heading\n```\nCode snippet\n```\n> [link](https://www.example.com)')
});

test('Mention html to markdown', () => {
let testString = '<mention-user>@[email protected]</mention-user>';
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]');

testString = '<mention-user>@[email protected]</mention-user>';
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]');

testString = '<mention-user>@[email protected]</mention-user>';
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]');

testString = '<mention-user>@[email protected]</mention-user>';
expect(parser.htmlToMarkdown(testString)).toBe('@[email protected]');
});

0 comments on commit 499d869

Please sign in to comment.