import type { SVGAttributes } from "../../types.js";
import { overrideSvgAttributes } from "./overrideSvgAttributes.js";
import fc from "fast-check";
import { parse } from "ultrahtml";
import { describe, expect, it } from "vitest";
const whitespaceArb = fc.string({ unit: fc.constant(" ") });
const svgArbitrary = fc
.record({
start: fc
.record({
preWhitespace: whitespaceArb,
svg: fc.mixedCase(fc.constant("")),
postWhitespace: whitespaceArb,
})
.map(
({ preWhitespace, svg, postWhitespace }) =>
`${preWhitespace}${svg}${postWhitespace}`,
),
})
.map(({ start, middle, end }) => `${start}${middle}${end}`);
const SVGAttributesArbitrary = fc.record({
height: fc.option(fc.integer()),
width: fc.option(fc.integer()),
"aria-hidden": fc.option(fc.boolean()),
"aria-label": fc.option(fc.string()),
viewBox: fc.option(fc.string()),
fill: fc.option(fc.string()),
xmlns: fc.option(fc.string()),
});
describe("overrideSvgAtrributes", () => {
it("should return the same output if no overrides are given", async () => {
expect(await overrideSvgAttributes("")).toBe("");
expect(await overrideSvgAttributes("