Skip to main content
Module

x/lume/tests/relations.test.ts

πŸ”₯ Static site generator for Deno πŸ¦•
Very Popular
Latest
File
import { assertSiteSnapshot, build, getSite } from "./utils.ts";import relations from "../plugins/relations.ts";
Deno.test("relations plugin", async (t) => { const site = getSite({ src: "relations", });
site.use(relations({ foreignKeys: { post: "post_id", category: { foreignKey: "category_id", idKey: "basename" }, comment: { foreignKey: "comment_id", pluralRelationKey: "comments" }, }, }));
await build(site); await assertSiteSnapshot(t, site);});