import { describe, expect, it } from "vitest";
import { EPC_BANDS, GOALS } from "./bands";
import { EPC_BANDS as SCENARIO_BANDS } from "@/lib/scenarios/model";
import { PORTFOLIO_GOALS } from "@/app/db/schema/portfolio";

// bands.ts is a schema-free mirror so client bundles don't drag in the
// Postgres driver. These guard it against drifting from the real sources.
describe("epc/bands mirror stays in sync with the schema", () => {
  it("matches the canonical EPC band order", () => {
    expect([...EPC_BANDS]).toEqual([...SCENARIO_BANDS]);
  });

  it("mirrors the portfolio goal strings", () => {
    expect(GOALS.EPC).toBe(PORTFOLIO_GOALS.EPC);
    expect(GOALS.CO2).toBe(PORTFOLIO_GOALS.CO2);
    expect(GOALS.ENERGY).toBe(PORTFOLIO_GOALS.ENERGY);
    expect(GOALS.VALUATION).toBe(PORTFOLIO_GOALS.VALUATION);
    expect(GOALS.NONE).toBe(PORTFOLIO_GOALS.NONE);
  });
});
