feat: add privacy, terms, and cookies pages
Footer and login legal links were stubs. Point them at real marketing pages that follow the Figma content-page template.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildLegalSyntheticPost,
|
||||
legalPathForSlug,
|
||||
} from "../../lib/legalSyntheticPost";
|
||||
|
||||
describe("legalSyntheticPost", () => {
|
||||
it("maps slugs to public paths", () => {
|
||||
expect(legalPathForSlug("privacy")).toBe("/privacy");
|
||||
expect(legalPathForSlug("terms")).toBe("/terms");
|
||||
expect(legalPathForSlug("cookies")).toBe("/cookies");
|
||||
});
|
||||
|
||||
it("builds a guide-shaped post from page messages", () => {
|
||||
const post = buildLegalSyntheticPost("privacy", {
|
||||
banner: {
|
||||
title: "Privacy Policy",
|
||||
description: "How we handle information.",
|
||||
author: "Media Economies Design Lab",
|
||||
date: "2026-08-15",
|
||||
},
|
||||
updated: "Last updated August 15, 2026.",
|
||||
intro: ["Hello."],
|
||||
sections: [{ heading: "What we collect", paragraphs: ["Email."] }],
|
||||
});
|
||||
|
||||
expect(post.slug).toBe("__legal__:privacy");
|
||||
expect(post.frontmatter.title).toBe("Privacy Policy");
|
||||
expect(post.filePath).toBe("messages/en/pages/privacy.json");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user