Files
OmniRoute/tests/unit/providers-uncloseai-noauth.test.ts
Praveen K Palaniswamy ce66d319b1 fix(quality): drain v3.8.50 base-reds — doc counts + orphan uncloseai test (#11160)
Validated against code before merge: 159 migration files on disk, 56 free-forever (Hack Club removal), 40 pools — counts verified, not trusted. check:docs-counts exit 0 (HARD failures drained; the 2 remaining soft executors-count notes are pre-existing on the tip) and check:test-discovery OK (orphan moved into the collected tree). These reds came from #11103/#11123 merging without the count regen — thanks for sweeping them @yourspraveen!
2026-08-22 20:41:12 -03:00

22 lines
868 B
TypeScript

import { test } from "node:test";
import assert from "node:assert/strict";
import { NOAUTH_PROVIDERS, providerAllowsOptionalApiKey } from "@/shared/constants/providers";
test("uncloseai should be treated as a no-auth provider", () => {
const isNoAuthRegistered = Object.prototype.hasOwnProperty.call(NOAUTH_PROVIDERS, "uncloseai");
const allowsOptionalKey = providerAllowsOptionalApiKey("uncloseai");
assert.equal(
isNoAuthRegistered || allowsOptionalKey,
true,
"uncloseai must be registered in NOAUTH_PROVIDERS or allow an optional API key " +
"so the dashboard doesn't force users to enter a key for a no-auth provider"
);
assert.equal(
isNoAuthRegistered,
true,
"uncloseai must be registered in NOAUTH_PROVIDERS (not just allow an optional key) " +
"so the dashboard renders the NoAuthProviderControls flow"
);
});