@ -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");