Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(tests): extract app tests into a dedicated module

Steven Enamakel8b03869ce73b
diff --git a/crates/openhuman-app/src/lib_tests.rs b/crates/openhuman-app/src/lib_tests.rs
index 223dc6c025..6f3c0333c3 100644
--- a/crates/openhuman-app/src/lib_tests.rs
+++ b/crates/openhuman-app/src/lib_tests.rs
@@ -1008,8 +1008,10 @@ fn registered_ipc_commands() -> std::collections::BTreeSet<String> {
.find("tauri::generate_handler![")
.expect("generate_handler! call in lib.rs");
let body = &src[start + "tauri::generate_handler![".len()..];
- let body = &body[..body.find(']').expect("closing ] of generate_handler!")];
+ // Stop at the first line that closes the macro; `#[cfg(...)]` attributes
+ // inside it carry their own `]`.
body.lines()
+ .take_while(|line| !line.trim_start().starts_with(']'))
.map(|line| line.split("//").next().unwrap_or("").trim())
.filter(|line| !line.is_empty() && !line.starts_with("#["))
.flat_map(|line| line.split(','))