test(opencode): guard plugin.tool existence before shape assertion

This commit is contained in:
van3hardy
2026-08-29 13:40:57 -04:00
committed by haelyra
parent e72f1e6824
commit b2a8091440
+1
View File
@@ -90,6 +90,7 @@ function main() {
for (const hook of expectedHooks) {
assert.strictEqual(typeof plugin[hook], "function", "missing hook: " + hook)
}
assert.ok(plugin.tool && typeof plugin.tool === "object", "plugin record must expose a tool object")
assert.deepStrictEqual(
Object.keys(plugin.tool).sort(),
["changed-files", "dependency-analyzer"],