diff --git a/src/builtins/fetch.rs b/src/builtins/fetch.rs index 89c7592..0f00892 100644 --- a/src/builtins/fetch.rs +++ b/src/builtins/fetch.rs @@ -56,3 +56,13 @@ fn format_uptime(uptime: u64) -> String { fn bytes_to_mega_bytes(bytes: u64) -> u64 { bytes / 1024 / 1024 } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_format_uptime_seconds() { + assert_eq!(format_uptime(35), "0h 0m 35s"); + } +}