/** * @vitest-environment jsdom */ import { describe, expect, it } from 'vitest' import { htmlToText } from '../composables/content' describe('html-to-text', () => { it('inline code', () => { expect(htmlToText('

text code inline

')) .toMatchInlineSnapshot('"text `code` inline"') }) it('code block', () => { expect(htmlToText('

text

code
')) .toMatchInlineSnapshot(` "text \`\`\`js code \`\`\`" `) }) it('bold & italic', () => { expect(htmlToText('

text bold italic

')) .toMatchInlineSnapshot('"text **bold** *italic*"') }) })