File size: 848 Bytes
95b671e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import { strict as assert } from "node:assert";
import { test } from "node:test";
import { buildSystemCapabilities } from "./system-capabilities.js";
test("system capabilities default to the open-core community edition", () => {
assert.deepEqual(buildSystemCapabilities({}), {
edition: "community",
billing: "none",
managedAgents: false,
ossAgents: true,
cloudUpgradeLinks: true,
});
});
test("system capabilities expose cloud billing and managed agents when explicitly enabled", () => {
assert.deepEqual(
buildSystemCapabilities({
SUPERLOG_EDITION: "cloud",
SUPERLOG_BILLING_PROVIDER: "stripe",
SUPERLOG_MANAGED_AGENTS_ENABLED: "true",
}),
{
edition: "cloud",
billing: "stripe",
managedAgents: true,
ossAgents: true,
cloudUpgradeLinks: false,
},
);
});
|