Add shared port registry workflow and improve scaffold tooling
This commit is contained in:
@@ -203,6 +203,25 @@ test("preserves comments and custom servers while pruning stale managed MCP entr
|
||||
assert.equal(parsed.servers.gitea, undefined);
|
||||
});
|
||||
|
||||
test("creates managed MCP config from an empty target file", () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-mcp-"));
|
||||
const targetFile = path.join(tempDir, "mcp.json");
|
||||
|
||||
fs.writeFileSync(targetFile, "", "utf8");
|
||||
|
||||
const result = runMerge({
|
||||
targetFile,
|
||||
templateFile: vscodeTemplateFile,
|
||||
serverKey: "servers",
|
||||
});
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
|
||||
const output = fs.readFileSync(targetFile, "utf8");
|
||||
const parsed = parseJsonc(output);
|
||||
assert.equal(parsed.servers.playwright.command, "npx");
|
||||
assert.equal(parsed.servers.filesystem.command, "docker");
|
||||
});
|
||||
|
||||
test("renders optional Gitea config when local overrides are complete", () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-mcp-"));
|
||||
const targetFile = path.join(tempDir, "mcp-config.json");
|
||||
|
||||
Reference in New Issue
Block a user