Skip to content

Commit 5ef8909

Browse files
committed
tasks: propagate errors in tests
1 parent c0eb5de commit 5ef8909

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

devenv-tasks/src/tests/mod.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,7 +2519,10 @@ mod property_tests {
25192519
}))
25202520
.unwrap();
25212521

2522-
let tasks_result = Tasks::new_with_db_path(config, db_path, VerbosityLevel::Quiet).await;
2522+
let tasks_result = Tasks::builder(config, VerbosityLevel::Quiet)
2523+
.with_db_path(db_path)
2524+
.build()
2525+
.await;
25232526

25242527
match tasks_result {
25252528
Ok(tasks) => {
@@ -2535,10 +2538,14 @@ mod property_tests {
25352538
matched_names.sort();
25362539
Ok(matched_names)
25372540
}
2538-
Err(_e) => {
2539-
// If task creation fails, return empty vec (e.g., for invalid query)
2541+
Err(Error::TaskNotFound(_)) => {
2542+
// Only return empty vec for TaskNotFound (no matching tasks)
25402543
Ok(vec![])
25412544
}
2545+
Err(e) => {
2546+
// Propagate other errors (IoError, CacheError, InvalidTaskName, etc.)
2547+
Err(e)
2548+
}
25422549
}
25432550
}
25442551

0 commit comments

Comments
 (0)