mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 09:01:14 +00:00
The zen.test.ts file was added without the standard skipIf guard, causing CI to fail on all PRs since no OPENCODE_API_KEY is configured. This follows the same pattern used by other API-dependent tests.
19 lines
654 B
TypeScript
19 lines
654 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { MODELS } from "../src/models.generated.js";
|
|
import { complete } from "../src/stream.js";
|
|
import type { Model } from "../src/types.js";
|
|
|
|
describe.skipIf(!process.env.OPENCODE_API_KEY)("OpenCode Zen Models Smoke Test", () => {
|
|
const zenModels = Object.values(MODELS.opencode);
|
|
|
|
zenModels.forEach((model) => {
|
|
it(`${model.id}`, async () => {
|
|
const response = await complete(model as Model<any>, {
|
|
messages: [{ role: "user", content: "Say hello.", timestamp: Date.now() }],
|
|
});
|
|
|
|
expect(response.content).toBeTruthy();
|
|
expect(response.stopReason).toBe("stop");
|
|
}, 60000);
|
|
});
|
|
});
|