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

Hello world!

\n`); }); });