Files
OmniRoute/tests/unit/static-constants-public-surface.test.ts
Diego Rodrigues de Sa e Souza 78f09c8d9f Release v3.8.41 (#5327)
Release v3.8.41 — 52 commits since v3.8.40 (19 CHANGELOG bullets, 11 contributors).

All gating CI green: Unit×8, Coverage×8, Vitest, Package Artifact, Quality Ratchet, CodeQL, Lint, Docs Sync (Strict), Node 24/26 compat, E2E×9, Integration, Electron smoke.

Advisory checks overridden (main unprotected): PR Test Policy = test-masking heuristic on the cumulative 52-commit assert delta (legitimate dead-code-sweep removals + consolidations, reviewed per-PR); SonarCloud/SonarQube = new-code maintainability/coverage quality gate (CodeQL/Semgrep/Security/npm-audit/Dependabot all clean — not a security finding).
2026-06-29 16:51:03 -03:00

28 lines
1.2 KiB
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
const config = await import("../../src/shared/constants/config.ts");
const colors = await import("../../src/shared/constants/colors.ts");
const pricing = await import("../../src/shared/constants/pricing.ts");
test("config constants public surface excludes removed app endpoint placeholders", () => {
assert.equal(Object.hasOwn(config, "SUBSCRIPTION_CONFIG"), false);
assert.equal(Object.hasOwn(config, "API_ENDPOINTS"), false);
assert.ok(config.PROVIDER_ENDPOINTS.openai);
assert.ok(config.APP_CONFIG.name);
});
test("colors public surface excludes removed provider-color wrapper", () => {
assert.equal(Object.hasOwn(colors, "getProviderColor"), false);
assert.ok(colors.PROVIDER_COLORS.codex);
assert.equal(colors.getProtocolColor("openai-chat", "openai").label, "OpenAI-Chat");
assert.equal(colors.getProxyStatusStyle("success").bg, "#059669");
});
test("pricing public surface excludes removed token-cost helper", () => {
assert.equal(Object.hasOwn(pricing, "calculateCostFromTokens"), false);
assert.equal(typeof pricing.getPricingForModel, "function");
assert.equal(typeof pricing.getDefaultPricing, "function");
assert.equal(typeof pricing.formatCost, "function");
});