Wrapped test

This commit is contained in:
Lukas Wölfer
2025-08-12 21:43:06 +02:00
parent 2faf8038fe
commit 22fa677d8a

View File

@@ -32,9 +32,14 @@ pub async fn fetch_wsdc_info(id: u32) -> Result<DanceInfo, DanceInfoError> {
Ok(x.into())
}
#[test]
#[ignore = "Only run when the mock api is setup"]
fn test_fetch_wsdc() {
#[cfg(test)]
mod tests {
#![allow(clippy::unwrap_used, reason="Allow unwrap in tests")]
use crate::worldsdc::fetch_wsdc_info;
#[test]
#[ignore = "Only run when the mock api is setup"]
fn test_fetch_wsdc() {
let rt = match tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
@@ -46,7 +51,9 @@ fn test_fetch_wsdc() {
}
};
let x = rt.block_on(fetch_wsdc_info(7));
dbg!(x);
dbg!(&x);
x.unwrap();
}
}
#[derive(thiserror::Error, Debug)]