Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjackyuanjie committed Apr 10, 2024
1 parent f4f4094 commit 4a0398a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions socketio/src/asynchronous/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,20 +1073,24 @@ mod test {
packet,
Packet::new(
PacketId::Event,
"on_abc_event".to_string(),
nsp.clone(),
Some(
serde_json::json!({
serde_json::json!([
"on_abc_event",
"",
{
"abc": 0,
"some_other": "value",
}).to_string()
}
])
.to_string()
),
None,
0,
None,
)
);


let cb = |message: Payload, _| {
async {
println!("Yehaa! My ack got acked?");
Expand Down
12 changes: 8 additions & 4 deletions socketio/src/client/raw_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,20 +762,24 @@ mod test {
packet,
Packet::new(
PacketId::Event,
"on_abc_event".to_string(),
nsp.clone(),
Some(
serde_json::json!({
serde_json::json!([
"on_abc_event",
"",
{
"abc": 0,
"some_other": "value",
}).to_string()
}
])
.to_string()
),
None,
0,
None,
)
);


assert!(socket
.emit_with_ack(
"test",
Expand Down

0 comments on commit 4a0398a

Please sign in to comment.