storkit: merge 444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api

This commit is contained in:
dave
2026-03-28 19:47:59 +00:00
parent d216f3c267
commit ddc4a57cd2
27 changed files with 188 additions and 187 deletions
+2 -8
View File
@@ -64,18 +64,12 @@ pub async fn search_files_impl(query: String, root: PathBuf) -> Result<Vec<Searc
#[cfg(test)]
mod tests {
use super::*;
use std::fs;
use crate::io::test_helpers::create_test_files;
use tempfile::TempDir;
fn setup_project(files: &[(&str, &str)]) -> TempDir {
let dir = TempDir::new().unwrap();
for (path, content) in files {
let full = dir.path().join(path);
if let Some(parent) = full.parent() {
fs::create_dir_all(parent).unwrap();
}
fs::write(full, content).unwrap();
}
create_test_files(&dir, files);
dir
}