mirror of
https://github.com/bendtherules/react-to-markdown.git
synced 2026-08-18 13:53:11 +00:00
tagHandler - Handle list and listitems
This commit is contained in:
@@ -75,3 +75,27 @@ test('should render H1 with mixed strong and em text', () => {
|
||||
) as string).trim()
|
||||
).toBe('# This is **Hello** _World_');
|
||||
});
|
||||
|
||||
test('should render plain unordered list with text', () => {
|
||||
expect(
|
||||
(render(
|
||||
<ul>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ul>
|
||||
) as string).trim()
|
||||
).toBe('- a\n- b\n- c');
|
||||
});
|
||||
|
||||
test('should render plain ordered list with text', () => {
|
||||
expect(
|
||||
(render(
|
||||
<ol>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
) as string).trim()
|
||||
).toBe('1. a\n2. b\n3. c');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user