Fix tests

This commit is contained in:
2026-10-25 12:50:39 -03:00
parent 4fad43d9cc
commit bcca8fa4a5
3 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ Deno.test("bad biome json is reported", () => {
assert(validate_biome({ ...PLAIN, colors: { grass: "green" } }).some((p) => p.startsWith("colors.grass")));
// which kinds of tree there are is up to the trees feature, see tests/wood_test.ts
assertEquals(validate_biome({ ...PLAIN, trees: { chance: 2, kinds: ["palm"] } }), [
"trees.chance must be a number from 0 to 1",
"trees.chance must be at most 1",
]);
assert(validate_biome({ ...PLAIN, trees: { chance: 1, kinds: [] } }).some((p) => p.startsWith("trees.kinds")));
assert(validate_biome({ id: "my_mod:flat" }).some((p) => p.startsWith("surface")));