mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 17:12:27 +03:00
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!
22 lines
868 B
TypeScript
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"
|
|
);
|
|
});
|