MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_json_response_format

Function test_json_response_format

atomic-cli/src/commands/agent/hooks.rs:939–955  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

937
938 #[test]
939 fn test_json_response_format() {
940 // Verify the JSON response format matches what Claude Code expects
941 let message = "Atomic is tracking this session.";
942 let response = serde_json::json!({
943 "systemMessage": message
944 });
945 let json = serde_json::to_string(&response).unwrap();
946 assert!(json.contains("systemMessage"));
947 assert!(json.contains("Atomic is tracking this session."));
948
949 // Parse it back to verify structure
950 let parsed: serde_json::Value = serde_json::from_str(&json).unwrap();
951 assert_eq!(
952 parsed["systemMessage"].as_str(),
953 Some("Atomic is tracking this session.")
954 );
955 }
956
957 #[test]
958 fn test_json_response_no_message() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected