Refactor pipeline policies, MCP registry, and unified config/runtime
This commit is contained in:
22
tests/config.test.ts
Normal file
22
tests/config.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { loadConfig } from "../src/config.js";
|
||||
|
||||
test("loads defaults and freezes config", () => {
|
||||
const config = loadConfig({});
|
||||
|
||||
assert.equal(config.agentManager.maxConcurrentAgents, 4);
|
||||
assert.equal(config.orchestration.maxDepth, 4);
|
||||
assert.equal(config.provisioning.portRange.basePort, 36000);
|
||||
assert.equal(config.discovery.fileRelativePath, ".agent-context/resources.json");
|
||||
assert.equal(Object.isFrozen(config), true);
|
||||
assert.equal(Object.isFrozen(config.orchestration), true);
|
||||
});
|
||||
|
||||
test("validates boolean env values", () => {
|
||||
assert.throws(
|
||||
() => loadConfig({ CODEX_SKIP_GIT_CHECK: "maybe" }),
|
||||
/must be "true" or "false"/,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user