0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/markdown/remark/test/entities.test.js
Emanuele Stoppa 062623438b
chore: use biome to sort imports - only test files (#10180)
* chore: use biome to sort imports

* do the sorting

* Update package.json

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-02-21 14:08:19 +00:00

18 lines
554 B
JavaScript

import assert from 'node:assert/strict';
import { before, describe, it } 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 = `&lt;i&gt;This should NOT be italic&lt;/i&gt;`;
const { code } = await processor.render(markdown);
assert.equal(code, `<p>&#x3C;i>This should NOT be italic&#x3C;/i></p>`);
});
});