39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import {
|
|
getIntegrationReadiness,
|
|
integrationReadinessDefinitions,
|
|
} from "../lib/operational-readiness";
|
|
|
|
test("integration readiness covers all MVP providers", () => {
|
|
assert.deepEqual(
|
|
integrationReadinessDefinitions.map((definition) => definition.id),
|
|
[
|
|
"google",
|
|
"pagespeed",
|
|
"openrouter",
|
|
"playwright",
|
|
"smtp",
|
|
"convex_jobs",
|
|
"rybbit",
|
|
],
|
|
);
|
|
});
|
|
|
|
test("integration readiness reports missing configuration without leaking values", () => {
|
|
const rows = getIntegrationReadiness({
|
|
GOOGLE_GEOCODING_API_KEY: "secret-google",
|
|
GOOGLE_PLACES_API_KEY: "secret-places",
|
|
PAGESPEED_API_KEY: "",
|
|
});
|
|
|
|
const google = rows.find((row) => row.id === "google");
|
|
const pageSpeed = rows.find((row) => row.id === "pagespeed");
|
|
|
|
assert.equal(google?.status, "configured");
|
|
assert.equal(pageSpeed?.status, "missing");
|
|
assert.equal(JSON.stringify(rows).includes("secret-google"), false);
|
|
assert.equal(JSON.stringify(rows).includes("secret-places"), false);
|
|
});
|