Seed a file into the mock and return its current version, so callers can use it as an expected value without hardcoding the version scheme.
(fs: &Arc<InMemoryFileSystem>, path: &str, content: &str)
| 1084 | /// can use it as an expected value without hardcoding the version |
| 1085 | /// scheme. |
| 1086 | async fn seed(fs: &Arc<InMemoryFileSystem>, path: &str, content: &str) -> String { |
| 1087 | use super::WorkspaceFileSystemExt; |
| 1088 | let ws_path = WorkspacePath::from_normalized(path); |
| 1089 | (*fs).write_text(&ws_path, content).await.unwrap(); |
| 1090 | let (_, version) = (*fs).read_text_with_version(&ws_path).await.unwrap(); |
| 1091 | version |
| 1092 | } |
| 1093 | |
| 1094 | #[test] |
| 1095 | fn version_conflict_is_downcastable_from_anyhow() { |
no test coverage detected