MCPcopy Create free account
hub / github.com/dallay/agentsync / test_codex_formatter_format_to_string

Function test_codex_formatter_format_to_string

src/mcp.rs:1422–1433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1420
1421 #[test]
1422 fn test_codex_formatter_format_to_string() {
1423 let formatter = CodexCliFormatter;
1424 let server = create_test_server();
1425 let servers: BTreeMap<&str, &McpServerConfig> = BTreeMap::from([("filesystem", &server)]);
1426
1427 let output = formatter.format_to_string(&servers).unwrap();
1428 let parsed: TomlValue = toml::from_str(&output).unwrap();
1429 let table = parsed.as_table().unwrap();
1430
1431 let mcp_servers = table.get("mcp_servers").unwrap().as_table().unwrap();
1432 assert!(mcp_servers.get("filesystem").is_some());
1433 }
1434
1435 #[test]
1436 fn test_codex_formatter_uses_http_headers_and_omits_type() {

Callers

nothing calls this directly

Calls 2

create_test_serverFunction · 0.70
format_to_stringMethod · 0.45

Tested by

no test coverage detected