mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 05:04:45 +00:00
test: describe plugin manifest migrations
This commit is contained in:
@@ -110,9 +110,21 @@ describe("doctor plugin manifest legacy contract repair", () => {
|
||||
manifestRoots: [pluginsRoot],
|
||||
});
|
||||
|
||||
expect(migrations).toHaveLength(1);
|
||||
expect(migrations[0]?.changeLines).toEqual([
|
||||
`- ${path.join(root, "openclaw.plugin.json")}: moved speechProviders to contracts.speechProviders`,
|
||||
const manifestPath = path.join(root, "openclaw.plugin.json");
|
||||
expect(migrations).toStrictEqual([
|
||||
{
|
||||
changeLines: [`- ${manifestPath}: moved speechProviders to contracts.speechProviders`],
|
||||
manifestPath,
|
||||
nextRaw: {
|
||||
id: "openai",
|
||||
providers: ["openai"],
|
||||
contracts: {
|
||||
speechProviders: ["openai"],
|
||||
},
|
||||
configSchema: { type: "object" },
|
||||
},
|
||||
pluginId: "openai",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -178,9 +190,21 @@ describe("doctor plugin manifest legacy contract repair", () => {
|
||||
manifestRoots: [pluginsRoot],
|
||||
});
|
||||
|
||||
expect(migrations).toHaveLength(1);
|
||||
expect(migrations[0]?.nextRaw.contracts).toEqual({
|
||||
speechProviders: ["openai"],
|
||||
});
|
||||
const manifestPath = path.join(root, "openclaw.plugin.json");
|
||||
expect(migrations).toStrictEqual([
|
||||
{
|
||||
changeLines: [`- ${manifestPath}: moved speechProviders to contracts.speechProviders`],
|
||||
manifestPath,
|
||||
nextRaw: {
|
||||
id: "openai",
|
||||
providers: ["openai"],
|
||||
contracts: {
|
||||
speechProviders: ["openai"],
|
||||
},
|
||||
configSchema: { type: "object" },
|
||||
},
|
||||
pluginId: "openai",
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user