Block registry api
This commit is contained in:
@@ -80,8 +80,8 @@ Deno.test("a texture's .json is checked, packed into the .cubi and read back", a
|
||||
const json = { animation: { frametime: 3, interpolate: true } };
|
||||
Deno.writeTextFileSync(`${textures}/lamps/goo.json`, JSON.stringify(json));
|
||||
|
||||
const lamps = () => load_and_check(sources).find((m) => m.id === "lava_lamps")!;
|
||||
const mod = lamps();
|
||||
const lamps = async () => (await load_and_check(sources)).find((m) => m.id === "lava_lamps")!;
|
||||
const mod = await lamps();
|
||||
assertEquals(mod.report.errors, []);
|
||||
const packed = read_mod(await pack_mod(mod), "lava_lamps.cubi");
|
||||
assertEquals([...packed.texture_json!], [["lava_lamps:lamps_goo", json]]);
|
||||
@@ -92,7 +92,7 @@ Deno.test("a texture's .json is checked, packed into the .cubi and read back", a
|
||||
`${textures}/lamps/goo.json`,
|
||||
JSON.stringify({ animation: { width: 5 } }),
|
||||
);
|
||||
const broken = lamps();
|
||||
const broken = await lamps();
|
||||
assertEquals(broken.report.errors, [
|
||||
"textures/lamps/goo.json: the png is 16×64, which doesn't split into 5×16 frames",
|
||||
"textures/stray.json: there's no stray.png for it to go with",
|
||||
|
||||
Reference in New Issue
Block a user