mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-22 03:51:18 +00:00
test: tighten postinstall migration assertions
This commit is contained in:
parent
93cfa46454
commit
4672c3eed3
1 changed files with 13 additions and 3 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue