import { describe, it, expect } from "vitest";
import { colorBorder } from "./color_border";

describe("colorBorder", () => {
  it("string vacio retorna dark-4", () => {
    expect(colorBorder("")).toBe("var(--mantine-color-dark-4)");
  });

  it("hex valido produce color-mix con 30 porciento", () => {
    expect(colorBorder("#0ea5e9")).toBe(
      "color-mix(in srgb, #0ea5e9 30%, var(--mantine-color-dark-4))"
    );
  });

  it("token mantine produce color-mix con tono -7", () => {
    expect(colorBorder("blue")).toBe(
      "color-mix(in srgb, var(--mantine-color-blue-7) 30%, var(--mantine-color-dark-4))"
    );
    expect(colorBorder("teal")).toBe(
      "color-mix(in srgb, var(--mantine-color-teal-7) 30%, var(--mantine-color-dark-4))"
    );
  });

  it("valor desconocido retorna dark-4", () => {
    expect(colorBorder("unknown")).toBe("var(--mantine-color-dark-4)");
  });
});
