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

Function test_format_json_single_entry

atomic-cli/src/commands/log/tests.rs:569–578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

567
568 #[test]
569 fn test_format_json_single_entry() {
570 let log = Log::new();
571 let entry = create_test_entry_with_header();
572 let output = log.format_json(&[entry]);
573
574 // Should be valid JSON array
575 let parsed: serde_json::Value = serde_json::from_str(&output).unwrap();
576 assert!(parsed.is_array());
577 assert_eq!(parsed.as_array().unwrap().len(), 1);
578 }
579
580 #[test]
581 fn test_format_json_multiple_entries() {

Callers

nothing calls this directly

Calls 3

format_jsonMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected