diff --git a/packages/markdown/parseMarkdown.test.js b/packages/markdown/parseMarkdown.test.js index 7221ac2cfb6966..53bf142babe0d0 100644 --- a/packages/markdown/parseMarkdown.test.js +++ b/packages/markdown/parseMarkdown.test.js @@ -1,5 +1,12 @@ import { expect } from 'chai'; -import { getContents, getDescription, getTitle, getHeaders, getCodeblock } from './parseMarkdown'; +import { + getContents, + getDescription, + getTitle, + getHeaders, + getCodeblock, + renderMarkdown, +} from './parseMarkdown'; describe('parseMarkdown', () => { describe('getTitle', () => { @@ -234,4 +241,39 @@ authors: }); }); }); + + describe('renderMarkdown', () => { + it('should render markdown lists correctly', () => { + expect( + renderMarkdown( + [ + 'The track presentation:', + '- `normal` the track will render a bar representing the slider value.', + '- `inverted` the track will render a bar representing the remaining slider value.', + '- `false` the track will render without a bar.', + ].join('\n'), + ), + ).to.equal( + [ + '
The track presentation:
', + 'normal
the track will render a bar representing the slider value.inverted
the track will render a bar representing the remaining slider value.false
the track will render without a bar.defaultOpen
.',
+ );
+ });
+ });
});