import { describe, it, expect } from "vitest";
import { splitConsentText } from "./index";
describe("splitConsentText", () => {
    it("should generate a unique ID for a marker", () => {
        const result = splitConsentText("By submitting, you agree to our {{0}} and {{1}}.");
        expect(result).toEqual([
            "By submitting, you agree to our ",
            "{{0}}",
            " and ",
            "{{1}}",
            ".",
        ]);
    });
    it("should handle text without placeholders", () => {
        const result = splitConsentText("No placeholders here.");
        expect(result).toEqual(["No placeholders here."]);
    });
    it("should handle consecutive placeholders", () => {
        const result = splitConsentText("{{0}}{{1}}{{2}}");
        expect(result).toEqual(["", "{{0}}", "", "{{1}}", "", "{{2}}", ""]);
    });
    it("should handle text starting and ending with placeholders", () => {
        const result = splitConsentText("{{0}} is the start and {{1}} is the end {{2}}");
        expect(result).toEqual([
            "",
            "{{0}}",
            " is the start and ",
            "{{1}}",
            " is the end ",
            "{{2}}",
            "",
        ]);
    });
    it("should handle empty string", () => {
        const result = splitConsentText("");
        expect(result).toEqual(undefined);
    });
    it("should handle text with special characters", () => {
        const result = splitConsentText("Special chars !@#$%^&*() {{0}} end.");
        expect(result).toEqual(["Special chars !@#$%^&*() ", "{{0}}", " end."]);
    });
});
//# sourceMappingURL=index.test.js.map