From 4672c3eed36f25ed4045741701fb8bd8ca5f680b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 10:14:49 +0100 Subject: [PATCH] test: tighten postinstall migration assertions --- test/scripts/postinstall-bundled-plugins.test.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/scripts/postinstall-bundled-plugins.test.ts b/test/scripts/postinstall-bundled-plugins.test.ts index b4baee0048c..e43df832499 100644 --- a/test/scripts/postinstall-bundled-plugins.test.ts +++ b/test/scripts/postinstall-bundled-plugins.test.ts @@ -342,7 +342,16 @@ describe("bundled plugin postinstall", () => { log, }); - expect(result).toMatchObject({ status: "migrated" }); + expect(result).toEqual({ + current: { + plugins: [{ pluginId: "demo" }], + }, + migrated: true, + preflight: { + deprecationWarnings: [], + }, + status: "migrated", + }); expect(migratePluginRegistryForInstall).toHaveBeenCalledWith({ env: { OPENCLAW_HOME: "/tmp/home" }, packageRoot, @@ -403,7 +412,7 @@ describe("bundled plugin postinstall", () => { importModule, log: { log: vi.fn(), warn: vi.fn() }, }), - ).resolves.toMatchObject({ + ).resolves.toEqual({ status: "disabled", migrated: false, reason: "disabled-env", @@ -427,9 +436,10 @@ describe("bundled plugin postinstall", () => { importModule, log: { log: vi.fn(), warn: vi.fn() }, }), - ).resolves.toMatchObject({ + ).resolves.toEqual({ status: "skip-existing", migrated: false, + preflight: {}, }); expect(importModule).toHaveBeenCalledOnce(); expect(migratePluginRegistryForInstall).toHaveBeenCalledWith({