import test from "node:test"; import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { dirname, join } from "node:path"; const root = join(dirname(fileURLToPath(import.meta.url)), ".."); test("WorldView defines play-time item container overlay APIs", () => { const src = readFileSync(join(root, "src/render/worldView.js"), "utf8"); // Method definitions (not mere call sites) — commit 4d19e1e wired calls without these. assert.match(src, /^\tupsertItemContainer\s*\(/m); assert.match(src, /^\tdespawnItemContainer\s*\(/m); assert.match(src, /^\titemContainerAtTile\s*\(/m); assert.match(src, /removeChunk[\s\S]*?despawnItemContainer\(id\)/); });