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

Function test_parse_event_invalid_json

atomic-agent/src/hooks/opencode.rs:972–978  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

970
971 #[test]
972 fn test_parse_event_invalid_json() {
973 let hook = make_hook();
974 let result = hook.parse_event(HookType::TurnEnd, b"not json");
975 assert!(result.is_err());
976 let err = result.unwrap_err();
977 assert!(matches!(err, AgentError::HookParseFailed { .. }));
978 }
979
980 #[test]
981 fn test_parse_session_start_missing_session_id() {

Callers

nothing calls this directly

Calls 2

make_hookFunction · 0.70
parse_eventMethod · 0.45

Tested by

no test coverage detected