mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:44:31 +00:00
test: move duplicate local scenario suites out of agents e2e
This commit is contained in:
21
src/agents/model-catalog.recovery.test.ts
Normal file
21
src/agents/model-catalog.recovery.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { loadModelCatalog } from "./model-catalog.js";
|
||||
import {
|
||||
installModelCatalogTestHooks,
|
||||
mockCatalogImportFailThenRecover,
|
||||
} from "./model-catalog.test-harness.js";
|
||||
|
||||
describe("loadModelCatalog e2e smoke", () => {
|
||||
installModelCatalogTestHooks();
|
||||
|
||||
it("recovers after an import failure on the next load", async () => {
|
||||
mockCatalogImportFailThenRecover();
|
||||
|
||||
const cfg = {} as OpenClawConfig;
|
||||
expect(await loadModelCatalog({ config: cfg })).toEqual([]);
|
||||
expect(await loadModelCatalog({ config: cfg })).toEqual([
|
||||
{ id: "gpt-4.1", name: "GPT-4.1", provider: "openai" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user