import { describe, it, expect } from "vitest";
import { ConformanceError } from "@/conformance/conformance-error";

describe("ConformanceError", () => {
  it("extends Error with the standard shape", () => {
    const err = new ConformanceError("auth.signIn: missing __instrumented brand");
    expect(err).toBeInstanceOf(Error);
    expect(err).toBeInstanceOf(ConformanceError);
    expect(err.message).toBe("auth.signIn: missing __instrumented brand");
    expect(err.name).toBe("ConformanceError");
  });

  it("preserves a stack trace", () => {
    const err = new ConformanceError("test");
    expect(typeof err.stack).toBe("string");
  });
});
