()
| 646 | |
| 647 | #[tokio::test] |
| 648 | async fn test_watcher_detects_added_file() { |
| 649 | let dir = TempDir::new().unwrap(); |
| 650 | |
| 651 | let mut watcher = FallbackWatcher::new(make_config(&dir)); |
| 652 | watcher.begin_turn("sess-1").await.unwrap(); |
| 653 | |
| 654 | // Add a file during the turn |
| 655 | fs::write(dir.path().join("new_file.rs"), "fn new() {}").unwrap(); |
| 656 | |
| 657 | let changes = watcher.end_turn().await.unwrap(); |
| 658 | assert_eq!(changes.added, vec![PathBuf::from("new_file.rs")]); |
| 659 | assert!(changes.modified.is_empty()); |
| 660 | assert!(changes.deleted.is_empty()); |
| 661 | } |
| 662 | |
| 663 | #[tokio::test] |
| 664 | async fn test_watcher_detects_deleted_file() { |
nothing calls this directly
no test coverage detected