import { describe, expect, it } from "vitest";
import { ProviderTurnBudget } from "./provider-turn-budget.js";

describe("ProviderTurnBudget", () => {
  it("tracks consumption as state and exposes a checkpointable snapshot", () => {
    const budget = new ProviderTurnBudget({ enabled: true, max: 2, used: 0 });

    expect(budget.consume("decide")).toBe(1);
    expect(budget.snapshot()).toEqual({ enabled: true, max: 2, used: 1 });
  });
});
