import {
extractHtmlHeadingsFromLine,
isHtmlHeadingLine,
stripHtmlTags,
} from "../html";
describe("html helpers", () => {
it("strips HTML tags", () => {
expect(stripHtmlTags("<strong>Hello</strong> world")).toBe("Hello world");
});
it("extracts headings from HTML lines", () => {
const line = "<h1>One</h1> text <h2>Two</h2>";
expect(extractHtmlHeadingsFromLine(line)).toEqual(["One", "Two"]);
});
it("detects HTML heading lines", () => {
expect(isHtmlHeadingLine("<h3>Title</h3>")).toBe(true);
expect(isHtmlHeadingLine("<p>Text</p>")).toBe(false);
});
});