feat: add module contracts and discovery
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { defineModule, type ModuleManifestInput } from "@ekklesia/module-sdk";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("module template", () => {
|
||||
it("ships a valid backend-only manifest", async () => {
|
||||
const manifestUrl = new URL("../ekklesia.module.json", import.meta.url);
|
||||
const manifestInput = JSON.parse(await readFile(manifestUrl, "utf8")) as ModuleManifestInput;
|
||||
const manifest = defineModule(manifestInput);
|
||||
|
||||
expect(manifest.id).toBe("example");
|
||||
expect(manifest.storage.buckets.map((bucket) => bucket.id)).toEqual(["records"]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user