2022-06-03 13:38:45 +00:00
|
|
|
import { renderMarkdown } from '../dist/index.js';
|
|
|
|
import chai from 'chai';
|
|
|
|
|
|
|
|
describe('strictness', () => {
|
|
|
|
it('should allow self-closing HTML tags (void elements)', async () => {
|
|
|
|
const { code } = await renderMarkdown(
|
|
|
|
`Use self-closing void elements<br>like word<wbr>break and images: <img src="hi.jpg">`,
|
|
|
|
{}
|
|
|
|
);
|
|
|
|
|
2022-06-03 13:39:43 +00:00
|
|
|
chai
|
|
|
|
.expect(code)
|
|
|
|
.to.equal(
|
|
|
|
`<p>Use self-closing void elements<br />like word<wbr />break and images: ` +
|
|
|
|
`<img src="hi.jpg" /></p>`
|
|
|
|
);
|
2022-06-03 13:38:45 +00:00
|
|
|
});
|
|
|
|
});
|