import { describe, it, expect } from "vitest";
import { severityScore } from "./alert.pipeline";

describe("severityScore", () => {
  it("returns critical for HIBP source", () => {
    expect(severityScore({ source: "hibp", dataType: "email" })).toBe("critical");
  });

  it("returns critical for ssn data type", () => {
    expect(severityScore({ source: "darkWebForum", dataType: "ssn" })).toBe("critical");
  });

  it("returns warning for shodan source", () => {
    expect(severityScore({ source: "shodan", dataType: "domain" })).toBe("warning");
  });

  it("returns warning for email data type", () => {
    expect(severityScore({ source: "securityTrails", dataType: "email" })).toBe("warning");
  });

  it("returns info for low-risk combinations", () => {
    expect(severityScore({ source: "securityTrails", dataType: "domain" })).toBe("info");
  });
});
