()
| 672 | |
| 673 | #[test] |
| 674 | fn test_record_files_populated() { |
| 675 | let graph = sherpa_graph(); |
| 676 | let tmp = tempfile::tempdir().unwrap(); |
| 677 | let record = to_agent_trace_record(&graph, tmp.path()); |
| 678 | |
| 679 | assert_eq!(record.files.len(), 1); |
| 680 | assert_eq!(record.files[0].path, "src/index.ts"); |
| 681 | assert_eq!(record.files[0].conversations.len(), 1); |
| 682 | |
| 683 | let conv = &record.files[0].conversations[0]; |
| 684 | assert!(conv.url.contains("tiny-star-8412")); |
| 685 | assert_eq!(conv.contributor.contributor_type, "ai"); |
| 686 | assert_eq!(conv.ranges[0].start_line, 1); |
| 687 | assert_eq!(conv.ranges[0].end_line, 12); |
| 688 | |
| 689 | // todo related ref |
| 690 | assert!(conv.related.iter().any(|r| r.ref_type == "todo")); |
| 691 | } |
| 692 | |
| 693 | #[test] |
| 694 | fn test_append_and_read_back() { |
nothing calls this directly
no test coverage detected