diff options
author | 2022-07-26 17:31:57 -0400 | |
---|---|---|
committer | 2022-07-26 17:31:57 -0400 | |
commit | da5e6ca128985a26842f630c45fcc989ba3ecf3a (patch) | |
tree | 7576785c8d167b3bb25687a02623b864f3475218 /packages/markdown/remark/test/entities.test.js | |
parent | c57242d5340fbf4bc9b0bfefc49fdbe2a79e82a5 (diff) | |
download | astro-da5e6ca128985a26842f630c45fcc989ba3ecf3a.tar.gz astro-da5e6ca128985a26842f630c45fcc989ba3ecf3a.tar.zst astro-da5e6ca128985a26842f630c45fcc989ba3ecf3a.zip |
Add tests for markdown content escaping (#4058)
Diffstat (limited to 'packages/markdown/remark/test/entities.test.js')
-rw-r--r-- | packages/markdown/remark/test/entities.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/markdown/remark/test/entities.test.js b/packages/markdown/remark/test/entities.test.js new file mode 100644 index 000000000..a6b5918a5 --- /dev/null +++ b/packages/markdown/remark/test/entities.test.js @@ -0,0 +1,12 @@ +import { renderMarkdown } from '../dist/index.js'; +import { expect } from 'chai'; + +describe('entities', () => { + const renderAstroMd = (text) => renderMarkdown(text, { isAstroFlavoredMd: false }); + + it('should not unescape entities', async () => { + const { code } = await renderAstroMd(`<i>This should NOT be italic</i>`); + + expect(code).to.equal(`<p><i>This should NOT be italic</i></p>`); + }); +}); |