import { describe, expect, it } from "vitest";
import { __markdownTestUtils } from "./customSchema";
describe("customSchema markdown helpers", () => {
it("renders markdown images as
tags and round-trips back to markdown", () => {
const markdown = "";
const html = __markdownTestUtils.markdownToHtml(markdown);
expect(html).toContain('
');
expect(__markdownTestUtils.htmlToMarkdown(html)).toBe(markdown);
});
it("handles images mixed with surrounding text", () => {
const markdown = [
"Success screenshot:",
"",
"Please archive it.",
].join("\n");
const html = __markdownTestUtils.markdownToHtml(markdown);
expect(html).toContain('
');
expect(__markdownTestUtils.htmlToMarkdown(html)).toBe(markdown);
});
it("renders expected-result style markdown with an image", () => {
const markdown = [
"Login should look like this",
"",
].join("\n");
const html = __markdownTestUtils.markdownToHtml(markdown);
expect(html).toContain('
');
expect(__markdownTestUtils.htmlToMarkdown(html)).toBe(markdown);
});
});