@@ -110,9 +110,21 @@ describe("doctor plugin manifest legacy contract repair", () => {
|
110 | 110 | manifestRoots: [pluginsRoot], |
111 | 111 | }); |
112 | 112 | |
113 | | -expect(migrations).toHaveLength(1); |
114 | | -expect(migrations[0]?.changeLines).toEqual([ |
115 | | -`- ${path.join(root, "openclaw.plugin.json")}: moved speechProviders to contracts.speechProviders`, |
| 113 | +const manifestPath = path.join(root, "openclaw.plugin.json"); |
| 114 | +expect(migrations).toStrictEqual([ |
| 115 | +{ |
| 116 | +changeLines: [`- ${manifestPath}: moved speechProviders to contracts.speechProviders`], |
| 117 | + manifestPath, |
| 118 | +nextRaw: { |
| 119 | +id: "openai", |
| 120 | +providers: ["openai"], |
| 121 | +contracts: { |
| 122 | +speechProviders: ["openai"], |
| 123 | +}, |
| 124 | +configSchema: { type: "object" }, |
| 125 | +}, |
| 126 | +pluginId: "openai", |
| 127 | +}, |
116 | 128 | ]); |
117 | 129 | }); |
118 | 130 | |
@@ -178,9 +190,21 @@ describe("doctor plugin manifest legacy contract repair", () => {
|
178 | 190 | manifestRoots: [pluginsRoot], |
179 | 191 | }); |
180 | 192 | |
181 | | -expect(migrations).toHaveLength(1); |
182 | | -expect(migrations[0]?.nextRaw.contracts).toEqual({ |
183 | | -speechProviders: ["openai"], |
184 | | -}); |
| 193 | +const manifestPath = path.join(root, "openclaw.plugin.json"); |
| 194 | +expect(migrations).toStrictEqual([ |
| 195 | +{ |
| 196 | +changeLines: [`- ${manifestPath}: moved speechProviders to contracts.speechProviders`], |
| 197 | + manifestPath, |
| 198 | +nextRaw: { |
| 199 | +id: "openai", |
| 200 | +providers: ["openai"], |
| 201 | +contracts: { |
| 202 | +speechProviders: ["openai"], |
| 203 | +}, |
| 204 | +configSchema: { type: "object" }, |
| 205 | +}, |
| 206 | +pluginId: "openai", |
| 207 | +}, |
| 208 | +]); |
185 | 209 | }); |
186 | 210 | }); |