import { unified } from 'unified'; import { describe, test, expect } from 'vitest'; import remarkParse from 'remark-parse'; import remarkRehype from 'remark-rehype'; import rehypeStringify from 'rehype-stringify'; import { rehypePluginPreWrapper } from '../plugin-markdown/rehypePlugins/preWrapper'; import { rehypePluginShiki } from '../plugin-markdown/rehypePlugins/shiki'; import shiki from 'shiki'; import remarkMdx from 'remark-mdx'; import { remarkPluginToc } from '../plugin-markdown/remarkPlugins/toc'; import remarkStringify from 'remark-stringify'; describe('Markdown compile cases', async () => { const processor = unified() .use(remarkParse) .use(remarkRehype) .use(rehypePluginPreWrapper) .use(rehypePluginShiki, { highlighter: await shiki.getHighlighter({ theme: 'nord' }) }) .use(rehypeStringify); test('Compile title', async () => { const mdContent = '# 123'; const result = processor.processSync(mdContent); expect(result.value).toMatchInlineSnapshot('"
I am using Beaver.js