Block registry api

This commit is contained in:
2026-11-12 20:41:13 -03:00
parent e7fe663746
commit 76802ed430
39 changed files with 499 additions and 100 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ async function packed_mods() {
const sources = Deno.makeTempDirSync({ prefix: "bworld_mod_src_" });
copy_dir("mods/bworld", `${sources}/bworld`);
create_mod("copper_tools", "Copper Tools", sources);
const mods = load_and_check(sources);
const mods = await load_and_check(sources);
for (const mod of mods) assertEquals(mod.report.errors, [], mod.id);
const folder = Deno.makeTempDirSync({ prefix: "bworld_mod_" });
@@ -206,7 +206,7 @@ Deno.test("a mod with its own deno.json is bundled with it", async () => {
`import { GREETING } from "lib/greeting.ts";\n// deno-lint-ignore no-explicit-any\nexport function setup(ctx: any) {\n\tctx.log(GREETING);\n}\n`,
);
const project = load_and_check(sources).find((m) => m.id === "project")!;
const project = (await load_and_check(sources)).find((m) => m.id === "project")!;
assertEquals(project.report.errors, []);
const packed = read_mod(await pack_mod(project), "project.cubi");
assertStringIncludes(packed.scripts.server!, "hello from a deno project");