



















@@ -342,7 +342,16 @@ describe("bundled plugin postinstall", () => {
342342 log,
343343});
344344345-expect(result).toMatchObject({ status: "migrated" });
345+expect(result).toEqual({
346+current: {
347+plugins: [{ pluginId: "demo" }],
348+},
349+migrated: true,
350+preflight: {
351+deprecationWarnings: [],
352+},
353+status: "migrated",
354+});
346355expect(migratePluginRegistryForInstall).toHaveBeenCalledWith({
347356env: { OPENCLAW_HOME: "/tmp/home" },
348357 packageRoot,
@@ -403,7 +412,7 @@ describe("bundled plugin postinstall", () => {
403412 importModule,
404413log: { log: vi.fn(), warn: vi.fn() },
405414}),
406-).resolves.toMatchObject({
415+).resolves.toEqual({
407416status: "disabled",
408417migrated: false,
409418reason: "disabled-env",
@@ -427,9 +436,10 @@ describe("bundled plugin postinstall", () => {
427436 importModule,
428437log: { log: vi.fn(), warn: vi.fn() },
429438}),
430-).resolves.toMatchObject({
439+).resolves.toEqual({
431440status: "skip-existing",
432441migrated: false,
442+preflight: {},
433443});
434444expect(importModule).toHaveBeenCalledOnce();
435445expect(migratePluginRegistryForInstall).toHaveBeenCalledWith({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。