Skip to content

Commit be5d5a6

Browse files
committed
feat: introduced some unit testing
1 parent 7081a33 commit be5d5a6

File tree

10 files changed

+440
-15
lines changed

10 files changed

+440
-15
lines changed

Cargo.lock

Lines changed: 202 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ openssl = { version = "0.10.73", features = ["vendored"] }
4646
sqlx = { version = "0.8.6", features = ["sqlite", "runtime-tokio-native-tls"] }
4747
bip39 = { version = "2.2.0", features = ["rand"] }
4848
dirs = "6.0.0"
49+
50+
[dev-dependencies]
51+
tokio-test = "0.4"
52+
serial_test = "3.1"
53+
rstest = "0.26.1"

src/parser/disputes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,6 @@ pub fn print_disputes_table(disputes_table: Vec<Event>) -> Result<String> {
117117

118118
Ok(table.to_string())
119119
}
120+
121+
#[cfg(test)]
122+
mod tests {}

src/parser/dms.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,6 @@ pub async fn print_direct_messages(dm: &[(Message, u64)], pool: &SqlitePool) ->
178178
}
179179
Ok(())
180180
}
181+
182+
#[cfg(test)]
183+
mod tests {}

src/parser/orders.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,6 @@ pub fn print_orders_table(orders_table: Vec<Event>) -> Result<String> {
281281

282282
Ok(table.to_string())
283283
}
284+
285+
#[cfg(test)]
286+
mod tests {}

src/util.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,3 +661,6 @@ pub fn get_mcli_path() -> String {
661661
pub async fn run_simple_order_msg(command: Commands, order_id: &Uuid, ctx: &Context) -> Result<()> {
662662
execute_send_msg(command, Some(*order_id), ctx, None).await
663663
}
664+
665+
#[cfg(test)]
666+
mod tests {}

0 commit comments

Comments
 (0)