videogen/apps/web/app/(marketing)/about/about-press.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

59 lines
2.1 KiB
TypeScript

import * as fs from "node:fs";
import * as path from "node:path";
import { describe, expect, it } from "vitest";
import { buildSitemapEntries } from "@/lib/seo/urls";
import { checkUnits, type Denylist } from "@/src/shared/policy/copy-check";
import { sourceUnits } from "@/src/shared/policy/source-units";
const WEB_ROOT = path.resolve(__dirname, "../../..");
const DENYLIST = JSON.parse(
fs.readFileSync(path.resolve(WEB_ROOT, "../../policy/copy-denylist.json"), "utf8"),
) as Denylist;
const FILES = [
"app/(marketing)/about/page.tsx",
"app/(marketing)/about/family.ts",
"app/(marketing)/press/page.tsx",
"app/(marketing)/press/assets.ts",
"lib/seo/entity.ts",
];
describe("MB2 /about and /press", () => {
it("are in the sitemap", () => {
const urls = buildSitemapEntries(new Date(0)).map((e) => e.url);
expect(urls).toContain("https://menivor.com/about");
expect(urls).toContain("https://menivor.com/press");
});
it("pass the copy denylist", () => {
const units = FILES.flatMap(
(rel) => sourceUnits(fs.readFileSync(path.join(WEB_ROOT, rel), "utf8"), rel).units,
);
expect(units.length).toBeGreaterThan(5);
const hits = checkUnits(DENYLIST, units, { flags: {} }).filter((h) => h.severity === "error");
expect(hits).toEqual([]);
});
it("link only brand and sample files that exist", async () => {
const { LOGO_FILES, SAMPLE_REELS } = await import("../press/assets");
for (const file of LOGO_FILES) {
expect(fs.existsSync(path.join(WEB_ROOT, "public", file.href)), file.href).toBe(true);
}
for (const reel of SAMPLE_REELS) {
for (const suffix of [".mp4", "-poster.jpg"]) {
const rel = `public/samples/showcase/${reel.slug}${suffix}`;
expect(fs.existsSync(path.join(WEB_ROOT, rel)), rel).toBe(true);
}
}
});
it("carry no legal or founder name until owner item 17", () => {
const rendered = FILES.flatMap(
(rel) => sourceUnits(fs.readFileSync(path.join(WEB_ROOT, rel), "utf8"), rel).units,
).map((u) => u.text);
for (const text of rendered) {
expect(text).not.toMatch(/\b(Ltd|LLC|Inc\.|A\.S\.|founder|founded by)\b/i);
}
});
});