diff options
author | 2023-09-14 18:22:16 +0800 | |
---|---|---|
committer | 2023-09-14 18:22:16 +0800 | |
commit | 7522bb4914f2f9e8b8f3c743bc9c941fd3aca644 (patch) | |
tree | d2d5491adb3c3fe85102679f2c5468c30df80c39 /packages/markdown/remark/test/entities.test.js | |
parent | 61ac5c9eaa47e7a8039f9cbee20cd73f9cee4516 (diff) | |
download | astro-7522bb4914f2f9e8b8f3c743bc9c941fd3aca644.tar.gz astro-7522bb4914f2f9e8b8f3c743bc9c941fd3aca644.tar.zst astro-7522bb4914f2f9e8b8f3c743bc9c941fd3aca644.zip |
Improve markdown rendering performance (#8532)
Diffstat (limited to 'packages/markdown/remark/test/entities.test.js')
-rw-r--r-- | packages/markdown/remark/test/entities.test.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/markdown/remark/test/entities.test.js b/packages/markdown/remark/test/entities.test.js index acaf71be1..b2dacb79f 100644 --- a/packages/markdown/remark/test/entities.test.js +++ b/packages/markdown/remark/test/entities.test.js @@ -1,13 +1,11 @@ -import { renderMarkdown } from '../dist/index.js'; +import { createMarkdownProcessor } from '../dist/index.js'; import { expect } from 'chai'; -import { mockRenderMarkdownParams } from './test-utils.js'; -describe('entities', () => { +describe('entities', async () => { + const processor = await createMarkdownProcessor(); + it('should not unescape entities in regular Markdown', async () => { - const { code } = await renderMarkdown( - `<i>This should NOT be italic</i>`, - mockRenderMarkdownParams - ); + const { code } = await processor.render(`<i>This should NOT be italic</i>`); expect(code).to.equal(`<p><i>This should NOT be italic</i></p>`); }); |