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

Function test_parse_extra_fields_ignored

atomic-agent/src/hooks/sherpa.rs:550–559  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548
549 #[test]
550 fn test_parse_extra_fields_ignored() {
551 let hook = make_hook();
552 let input = br#"{
553 "session_id": "s1",
554 "unknown_field": "whatever",
555 "another": 42
556 }"#;
557 let event = hook.parse_event(HookType::SessionStart, input).unwrap();
558 assert_eq!(event.session_id, "s1");
559 }
560
561 // --- default trait ---
562

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected