import { describe, expect, it } from 'vitest' import { createMarkdown } from '../src/core/markdown' import { resolveOptions } from '../src/core/options' describe('transform', async () => { const options = resolveOptions({}) const markdownToVue = createMarkdown(options) it('basic', async () => { const md = `--- title: Hey --- # Hello - A - B - C ` expect((await markdownToVue('', md)).code).toMatchSnapshot() }) it('style', async () => { const md = ` # Hello ` expect((await markdownToVue('', md)).code).toMatchSnapshot() }) it('script setup', async () => { const md = ` # Hello ` expect((await markdownToVue('', md)).code).toMatchSnapshot() }) it('exposes frontmatter', async () => { const md = `--- title: Hey --- # Hello` expect((await markdownToVue('', md)).code).toMatchSnapshot() }) it('couldn\'t expose frontmatter', async () => { const md = `--- title: Hey --- ` expect((await markdownToVue('', md)).code).toMatchSnapshot() }) it('escapeCodeTagInterpolation', async () => { const md = `