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

Function test_turn_event_serde_skips_none_fields

atomic-agent/src/event.rs:1336–1345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1334
1335 #[test]
1336 fn test_turn_event_serde_skips_none_fields() {
1337 let event = TurnEvent::new("s", HookType::TurnEnd);
1338 let json = serde_json::to_string(&event).unwrap();
1339 // None fields should not appear in JSON output
1340 assert!(!json.contains("prompt"));
1341 assert!(!json.contains("tool_name"));
1342 assert!(!json.contains("tool_use_id"));
1343 assert!(!json.contains("transcript_path"));
1344 assert!(!json.contains("raw_json"));
1345 }
1346
1347 // TurnChanges tests
1348

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected