0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
astro/packages/markdown/remark/test/entities.test.js
Shoaib Khan 2dbb6a3e08
chore: Migrate All packages/markdown/remark/tests to node:test (#10083)
* chore: Migrate All packages/markdown/remark/tests to node:test

* Some minor fixes
2024-02-12 12:25:29 +00:00

18 lines
554 B
JavaScript

import assert from 'node:assert/strict';
import { describe, it, before } from 'node:test';
import { createMarkdownProcessor } from '../dist/index.js';
describe('entities', async () => {
let processor;
before(async () => {
processor = await createMarkdownProcessor();
});
it('should not unescape entities in regular Markdown', async () => {
const markdown = `<i>This should NOT be italic</i>`;
const { code } = await processor.render(markdown);
assert.equal(code, `<p>&#x3C;i>This should NOT be italic&#x3C;/i></p>`);
});
});