mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-10-19 13:30:37 +00:00
Batch-merged with the owner's 2026-10-10 hold/backlog PR wave (/merge-batch). Validated in one combined tree of 43 boarded PRs on top of release/v3.8.52 (048d9e2f): typecheck:core, check:open-sse-typecheck, check-deps, check-test-discovery, changelog-integrity, complexity + cognitive ratchets, check:docs-all, i18n UI coverage, ESLint on the 142 changed source files - green; 58 changed node:test files 584/586 (2 timing flakes in video-retention-http-12150 that pass in isolation) and 3 vitest files 116/116. File-size overruns in that tree belong only to PRs held out of this wave (#16110, #16112, #16140, #15790). Warning: base-red inherited: #15306.
29 lines
911 B
TypeScript
29 lines
911 B
TypeScript
import { describe, it } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const mod = await import("../../open-sse/executors/venice-web.ts");
|
|
|
|
describe("VeniceWebExecutor", () => {
|
|
it("can be instantiated", () => {
|
|
const executor = new mod.VeniceWebExecutor();
|
|
assert.ok(executor);
|
|
});
|
|
|
|
it("execute returns error on fetch failure", async () => {
|
|
const executor = new mod.VeniceWebExecutor();
|
|
try {
|
|
const result = await executor.execute({
|
|
model: "venice-default",
|
|
body: { messages: [{ role: "user", content: "hi" }] },
|
|
stream: false,
|
|
credentials: { apiKey: "" },
|
|
signal: null,
|
|
});
|
|
assert.ok(result.response instanceof Response);
|
|
assert.ok(typeof result.url === "string");
|
|
assert.equal(result.url, "https://outerface.venice.ai/api/inference/chat");
|
|
} catch {
|
|
// Network error expected
|
|
}
|
|
});
|
|
});
|