Skip to content

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

style(web_chat): apply rustfmt formatting to tests

Steven Enamakel7d851d0b9fa8
diff --git a/crates/openhuman-core/src/web_chat/event_bus_tests.rs b/crates/openhuman-core/src/web_chat/event_bus_tests.rs
index aa36c7cbee..d58054dc11 100644
--- a/crates/openhuman-core/src/web_chat/event_bus_tests.rs
+++ b/crates/openhuman-core/src/web_chat/event_bus_tests.rs
@@ -344,8 +344,8 @@ async fn agent_surface_bridges_queue_item_queued() {
});
let ev = find_agent_web_event(&mut web_rx, "queue_item_queued", thread_id).await;
- let item: QueueItemPayload = serde_json::from_value(wire(&ev)["queue_item"].clone())
- .expect("queue_item");
+ let item: QueueItemPayload =
+ serde_json::from_value(wire(&ev)["queue_item"].clone()).expect("queue_item");
assert_eq!(item.id, "item-1");
assert_eq!(item.text_preview, Some("hello".to_string()));
}
@@ -393,8 +393,8 @@ async fn agent_surface_bridges_queue_item_delivered_with_lane() {
});
let ev = find_agent_web_event(&mut web_rx, "queue_item_delivered", thread_id).await;
- let item: QueueItemPayload = serde_json::from_value(wire(&ev)["queue_item"].clone())
- .expect("queue_item");
+ let item: QueueItemPayload =
+ serde_json::from_value(wire(&ev)["queue_item"].clone()).expect("queue_item");
assert_eq!(item.id, "item-2");
assert_eq!(item.lane, Some("collect".to_string()));
}
@@ -567,12 +567,7 @@ async fn publish_web_channel_event_preserves_an_explicit_ts() {
parts: None,
});
- let ev = find_agent_web_event(
- &mut web_rx,
- "chat_done",
- "thread-ts-stamp-probe-explicit",
- )
- .await;
+ let ev = find_agent_web_event(&mut web_rx, "chat_done", "thread-ts-stamp-probe-explicit").await;
assert_eq!(ev.context().ts, Some(123));
}
diff --git a/crates/openhuman-core/src/web_chat/presentation_tests.rs b/crates/openhuman-core/src/web_chat/presentation_tests.rs
index d756edeeb1..41e3e6f304 100644
--- a/crates/openhuman-core/src/web_chat/presentation_tests.rs
+++ b/crates/openhuman-core/src/web_chat/presentation_tests.rs
@@ -98,7 +98,8 @@ async fn chat_done_carries_timing_when_a_snapshot_is_supplied() {
};
let crate::web_chat::WebChannelEvent::ChatDone {
- timing: Some(payload), ..
+ timing: Some(payload),
+ ..
} = done.wire_event()
else {
panic!("chat_done.timing must be Some");
diff --git a/crates/openhuman-core/src/web_chat/progress_tests.rs b/crates/openhuman-core/src/web_chat/progress_tests.rs
index 682a8567ba..c0c41d1a8e 100644
--- a/crates/openhuman-core/src/web_chat/progress_tests.rs
+++ b/crates/openhuman-core/src/web_chat/progress_tests.rs
@@ -297,7 +297,8 @@ async fn no_heartbeat_before_turn_started() {
loop {
match events.try_recv() {
Ok(ev) => assert_ne!(
- ev.context().thread_id, thread_id,
+ ev.context().thread_id,
+ thread_id,
"unexpected pre-turn event {} for {thread_id}",
ev.event_name()
),
diff --git a/crates/openhuman-core/src/web_chat/suggestions_tests.rs b/crates/openhuman-core/src/web_chat/suggestions_tests.rs
index cf9c6bc9a1..0aa12b76fa 100644
--- a/crates/openhuman-core/src/web_chat/suggestions_tests.rs
+++ b/crates/openhuman-core/src/web_chat/suggestions_tests.rs
@@ -104,8 +104,7 @@ async fn drain_suggestions_event(
loop {
match tokio::time::timeout(Duration::from_secs(2), rx.recv()).await {
Ok(Ok(ev))
- if ev.event_name() == "chat_suggestions"
- && ev.context().thread_id == thread_id =>
+ if ev.event_name() == "chat_suggestions" && ev.context().thread_id == thread_id =>
{
return Some(ev);
}