deno.land / x / lume@v2.1.4 / tests / relations.test.ts

relations.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);});
lume

Version Info

Tagged at
7 months ago