style: Applied uniform formatting across all new UI test files

This commit is contained in:
Dark-Alex-17 committed 2025-12-15 20:18:28 -07:00
1 parent aadd6c8abf
commit c072c57bbb
23 files changed
+337 -140

No files matched your search

+7 -9
View File
@@ -1,12 +1,12 @@
#[cfg(test)]
#[allow(dead_code)]
pub mod test_utils {
use std::cell::Cell;
use chrono::DateTime;
use ratatui::Frame;
use ratatui::Terminal;
use ratatui::backend::TestBackend;
use ratatui::buffer::Buffer;
use std::cell::Cell;
use crate::app::App;
@@ -18,14 +18,12 @@ pub mod test_utils {
impl Utc {
pub fn now() -> DateTime<chrono::Utc> {
TIMESTAMP.with(|timestamp| {
let ts = timestamp.get();
DateTime::<chrono::Utc>::from_timestamp(
if ts != 0 { ts } else { 1684618200 },
0,
)}
).expect("a valid timestamp set")
TIMESTAMP
.with(|timestamp| {
let ts = timestamp.get();
DateTime::<chrono::Utc>::from_timestamp(if ts != 0 { ts } else { 1684618200 }, 0)
})
.expect("a valid timestamp set")
}
}