import { describe, expect, it } from "vitest";
import { fillRecipeTemplate } from "./recipe-template";

describe("fillRecipeTemplate", () => {
  it("remplace name et n", () => {
    expect(fillRecipeTemplate("{name} — #{n}", { name: "Riz", n: 2 })).toBe("Riz — #2");
  });

  it("tolère des variables absentes", () => {
    expect(fillRecipeTemplate("{name}", {})).toBe("");
  });
});
