diff --git a/test/index.ts b/test/index.ts index c68e351..a6f9e07 100644 --- a/test/index.ts +++ b/test/index.ts @@ -21,7 +21,34 @@ import remarkRehype from 'remark-rehype' import rehypeStringify from 'rehype-stringify' import { DEFAULT_ADMONITION_TYPES, remarkAdmonition } from '../src/index.js' -test(`remarkAdmonition works`, () => { +test(`remarkAdmonition works without options`, () => { + const html = String( + unified() + .use(remarkParse) + .use(remarkDirective) + .use(remarkAdmonition) + .use(remarkRehype) + .use(rehypeStringify).processSync(` +# Hello World! + +:::note +Be careful folks! +::: + +:::fyi[**title** time] +Wowowow! +::: + `), + ) + + expect(html).toMatchInlineSnapshot(` +"

Hello World!

+

Be careful folks!

+

title time

Wowowow!

" +`) +}) + +test(`remarkAdmonition works with options`, () => { const html = String( unified() .use(remarkParse)