Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
36 lines
951 B
TypeScript
36 lines
951 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
openAiCompatibleConnectReady,
|
|
openAiCompatibleProbeSuccessMessage,
|
|
} from "./openai-compatible-ui.js";
|
|
|
|
describe("openAiCompatibleConnectReady", () => {
|
|
it("allows a new connection with base URL and explicit model id", () => {
|
|
expect(
|
|
openAiCompatibleConnectReady({
|
|
baseUrl: "http://127.0.0.1:8000/v1",
|
|
modelId: "qwen",
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("rejects empty base URL or model id", () => {
|
|
expect(
|
|
openAiCompatibleConnectReady({
|
|
baseUrl: " ",
|
|
modelId: "qwen",
|
|
}),
|
|
).toBe(false);
|
|
expect(
|
|
openAiCompatibleConnectReady({
|
|
baseUrl: "http://127.0.0.1:8000/v1",
|
|
modelId: "",
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
|
|
it("guides manual entry when a successful probe lists no models", () => {
|
|
expect(openAiCompatibleProbeSuccessMessage(0)).toBe("Server found. Enter a model name.");
|
|
});
|
|
});
|