




















@@ -235,19 +235,43 @@ describe("loadModelCatalog", () => {
235235mockPiDiscoveryModels(models);
236236237237const first = await loadModelCatalog({ config: {} as OpenClawConfig });
238-expect(first).toContainEqual({ id: "existing", name: "Existing", provider: "ollama" });
238+expect(first).toStrictEqual([
239+{
240+id: "existing",
241+name: "Existing",
242+provider: "ollama",
243+contextWindow: undefined,
244+reasoning: undefined,
245+input: undefined,
246+compat: undefined,
247+},
248+]);
239249240250models.push({ id: "glm-5.1:cloud", name: "GLM 5.1 Cloud", provider: "ollama" });
241251resetModelCatalogCacheForTest();
242252mockPiDiscoveryModels(models);
243253244254const second = await loadModelCatalog({ config: {} as OpenClawConfig });
245-expect(second).toContainEqual({ id: "existing", name: "Existing", provider: "ollama" });
246-expect(second).toContainEqual({
247-id: "glm-5.1:cloud",
248-name: "GLM 5.1 Cloud",
249-provider: "ollama",
250-});
255+expect(second).toStrictEqual([
256+{
257+id: "existing",
258+name: "Existing",
259+provider: "ollama",
260+contextWindow: undefined,
261+reasoning: undefined,
262+input: undefined,
263+compat: undefined,
264+},
265+{
266+id: "glm-5.1:cloud",
267+name: "GLM 5.1 Cloud",
268+provider: "ollama",
269+contextWindow: undefined,
270+reasoning: undefined,
271+input: undefined,
272+compat: undefined,
273+},
274+]);
251275});
252276253277it("returns partial results on discovery errors", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。