12 lines
693 B
TypeScript
12 lines
693 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { calculateMinimaxH3ActualAmountFen, minimaxH3VideoPriceFenPerSecond } from "@/lib/server/minimax-billing";
|
|
|
|
describe("MiniMax H3 billing", () => {
|
|
it("uses official 768P and 2K rates with the platform 1.2 markup", () => {
|
|
expect(minimaxH3VideoPriceFenPerSecond("768P")).toBe(50);
|
|
expect(minimaxH3VideoPriceFenPerSecond("2k")).toBe(80);
|
|
expect(calculateMinimaxH3ActualAmountFen({ resolution: "768P", outputSeconds: 5, inputImageCount: 1, markupMultiplier: 1.2 })).toBe(300);
|
|
expect(calculateMinimaxH3ActualAmountFen({ resolution: "2K", outputSeconds: 5, inputImageCount: 1, markupMultiplier: 1.2 })).toBe(480);
|
|
});
|
|
});
|