Block registry api
This commit is contained in:
@@ -88,13 +88,13 @@ Deno.test("a mod's model can use the base game's templates as its parent", async
|
||||
Deno.removeSync(dir, { recursive: true });
|
||||
});
|
||||
|
||||
Deno.test("check-mods reports a parent that doesn't exist and parents that loop", () => {
|
||||
Deno.test("check-mods reports a parent that doesn't exist and parents that loop", async () => {
|
||||
const dir = mods_with({
|
||||
orphan: { id: "copper_tools:orphan", parent: "copper_tools:nowhere" },
|
||||
one: { id: "copper_tools:one", parent: "copper_tools:two" },
|
||||
two: { id: "copper_tools:two", parent: "copper_tools:one" },
|
||||
});
|
||||
const errors = load_and_check(dir).find((mod) => mod.id === "copper_tools")!.report.errors.join("\n");
|
||||
const errors = (await load_and_check(dir)).find((mod) => mod.id === "copper_tools")!.report.errors.join("\n");
|
||||
assert(errors.includes("model copper_tools:nowhere doesn't exist"), errors);
|
||||
assert(errors.includes("copper_tools:one's parents loop"), errors);
|
||||
Deno.removeSync(dir, { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user