import { describe, it, expect } from "vitest";
import { matchConsentText } from "./index";
describe("matchConsentText", () => {
    it("should match a valid placeholder", () => {
        const result = matchConsentText("{{0}}");
        expect(JSON.stringify(result)).toEqual(JSON.stringify(["{{0}}", "0"]));
    });
    it("should return null for non-matching text", () => {
        const result = matchConsentText("No match here");
        expect(result).toBeNull();
    });
    it("should return null for partially matching text", () => {
        const result = matchConsentText("{0}");
        expect(result).toBeNull();
    });
    it("should match placeholders with multiple digits", () => {
        const result = matchConsentText("{{123}}");
        expect(JSON.stringify(result)).toEqual(JSON.stringify(["{{123}}", "123"]));
    });
    it("should return null for empty string", () => {
        const result = matchConsentText("");
        expect(result).toBeNull();
    });
    it("should return null for malformed placeholders", () => {
        const result = matchConsentText("{{abc}}");
        expect(result).toBeNull();
    });
    it("should not match placeholders with leading zeros", () => {
        const result = matchConsentText("{{007}}");
        expect(JSON.stringify(result)).toEqual(JSON.stringify(["{{007}}", "007"]));
    });
});
//# sourceMappingURL=index.test.js.map