videogen/apps/web/app/(marketing)/pricing/per-reel-price.test.ts
caelum0x d56639a594
Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

41 lines
1.5 KiB
TypeScript

/**
* M3.1: the pricing page states the one public pricing model (MD8): one
* credit per reel up to 60 s, one per started minute for longer videos, and
* premium add-ons on their own credits shown before render. It never claims
* that length does not change the price.
*/
import * as fs from "node:fs";
import * as path from "node:path";
import { describe, expect, it } from "vitest";
import { creditsForSeconds, perReelRows } from "./PerReelPrice";
describe("credits by length", () => {
it("matches the API table", () => {
expect([15, 60, 61, 90, 150, 180, 600].map(creditsForSeconds)).toEqual([1, 1, 2, 2, 3, 3, 10]);
});
});
describe("per-reel copy", () => {
const source = fs.readFileSync(path.join(__dirname, "PerReelPrice.tsx"), "utf8");
it("states the per-minute rule and no longer denies length pricing", () => {
expect(source).toMatch(/one credit per started minute/);
expect(source).not.toMatch(/Length doesn't change/);
expect(source).not.toMatch(/separate credit types/);
});
it("the worked example agrees with the table", () => {
expect(source).toMatch(/2\.5-minute video uses 3/);
expect(creditsForSeconds(150)).toBe(3);
});
it("per-reel rows still come from the pack list", () => {
const rows = perReelRows([
{ name: "Starter", price: "$19", credits: 30 } as never,
{ name: "Free", price: "$0", credits: 3 } as never,
]);
expect(rows.map((row) => row.perReel)).toEqual(["$0.63", "Free"]);
});
});