From 6b11ffeb7d7f9191baa596108dcef81e20c389b5 Mon Sep 17 00:00:00 2001 From: Ali Arslan <149683093+aarslan007@users.noreply.github.com> Date: Wed, 28 Oct 2026 22:48:50 +0500 Subject: [PATCH] fix(tests): assert the inert OpenCode stub as a V2 definition object --- tests/scripts/build-opencode.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/scripts/build-opencode.test.js b/tests/scripts/build-opencode.test.js index 36c924c1c..53307b6a5 100644 --- a/tests/scripts/build-opencode.test.js +++ b/tests/scripts/build-opencode.test.js @@ -41,7 +41,11 @@ function checkRuntime(runtimeRoot, extension, loader, installedHome = false) { // the hooks module is initialized exactly once; published package entry // imports continue to expose the actual plugin. const active = installedHome === "true" ? await load("plugins/ecc-hooks") : entry - if (installedHome === "true") assert.deepEqual(await entry.default({}), {}) + // The inert stub is a V2 definition object (id + setup), not a factory. + if (installedHome === "true") { + assert.equal(entry.default.id, "ecc-hooks") + assert.equal(typeof entry.default.setup, "function") + } const plugin = await active.default({ client: { app: { log: (event) => logs.push(event.body) } }, $: () => { throw new Error("Unexpected shell execution") },