import { describe, expect, test } from "vitest";
import { runLuckyGiftSimulation } from "@/features/lucky-gift/simulation.js";

const input = {
    costMax: "5000",
    costMin: "100",
    drawsMax: "1000",
    drawsMin: "0",
    rooms: "50",
    users: "100",
};

describe("lucky gift simulation", () => {
    test("uses seed as the simulation batch identity", () => {
        const first = runLuckyGiftSimulation(null, { ...input, seed: 1001 });
        const sameSeed = runLuckyGiftSimulation(null, { ...input, seed: 1001 });
        const nextSeed = runLuckyGiftSimulation(null, { ...input, seed: 1002 });

        expect(first.csv).toBe(sameSeed.csv);
        expect(first.csv).not.toBe(nextSeed.csv);
    });
});
