The section mixed Structure Before Crisis art with the Community Rules booklet; pairing each title to its own cover and PDF, and cropping the Figma cover padding, keeps the two cards consistent. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
632 B
TypeScript
22 lines
632 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
import {
|
|
governanceBookletPath,
|
|
structureBeforeCrisisPath,
|
|
} from "../../../lib/assetUtils";
|
|
|
|
const publicRoot = join(process.cwd(), "public");
|
|
|
|
function assertPdf(relativePath: string) {
|
|
const bytes = readFileSync(join(publicRoot, relativePath));
|
|
expect(bytes.subarray(0, 5).toString("ascii")).toBe("%PDF-");
|
|
}
|
|
|
|
describe("marketing book PDFs", () => {
|
|
it("ships both About book downloads as PDFs", () => {
|
|
assertPdf(governanceBookletPath());
|
|
assertPdf(structureBeforeCrisisPath());
|
|
});
|
|
});
|