mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 20:44:31 +00:00
test: reclassify models-config suites from e2e to unit lane
This commit is contained in:
17
src/agents/models-config.providers.qianfan.test.ts
Normal file
17
src/agents/models-config.providers.qianfan.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { mkdtempSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { withEnvAsync } from "../test-utils/env.js";
|
||||
import { resolveImplicitProviders } from "./models-config.providers.js";
|
||||
|
||||
describe("Qianfan provider", () => {
|
||||
it("should include qianfan when QIANFAN_API_KEY is configured", async () => {
|
||||
const agentDir = mkdtempSync(join(tmpdir(), "openclaw-test-"));
|
||||
await withEnvAsync({ QIANFAN_API_KEY: "test-key" }, async () => {
|
||||
const providers = await resolveImplicitProviders({ agentDir });
|
||||
expect(providers?.qianfan).toBeDefined();
|
||||
expect(providers?.qianfan?.apiKey).toBe("QIANFAN_API_KEY");
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user