import { renderMarkdown } from '../dist/index.js'; import chai from 'chai'; describe('components', () => { const renderAstroMd = (text) => renderMarkdown(text, { isAstroFlavoredMd: true }); it('should be able to serialize string', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should be able to serialize boolean attribute', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should be able to serialize array', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should be able to serialize object', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should be able to serialize empty attribute', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); // Notable omission: shorthand attribute it('should be able to serialize spread attribute', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should allow client:* directives', async () => { const { code } = await renderAstroMd(``); chai.expect(code).to.equal(``); }); it('should normalize children', async () => { const { code } = await renderAstroMd(`Hello world!`); chai.expect(code).to.equal(`Hello world!`); }); it('should be able to nest components', async () => { const { code } = await renderAstroMd( `Hello world!`, {} ); chai .expect(code) .to.equal(`Hello world!`); }); it('should allow markdown without many spaces', async () => { const { code } = await renderAstroMd( ` # Hello world! `, {} ); chai.expect(code).to.equal(`

Hello world!

`); }); });