import { describe, expect, test } from "vitest";
import { stripHtmlTags } from "../src/utils.ts";
describe("stripHtmlTags", () => {
test("removes a complete tag pair", () => {
expect(stripHtmlTags("
hello
")).toBe("hello");
});
test("removes adjacent and nested tags", () => {
expect(stripHtmlTags("hi")).toBe("hi");
expect(stripHtmlTags("a
b
c")).toBe("abc");
});
test("removes HTML comments", () => {
expect(stripHtmlTags("beforeafter")).toBe("beforeafter");
});
test("strips an unterminated tag fragment, leaving no angle brackets", () => {
expect(stripHtmlTags("text