Added unit tests for all the new widgets

This commit is contained in:
2024-02-13 12:03:56 -07:00
parent 6ba78cb4ba
commit 649f4b5e3b
16 changed files with 611 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
#[cfg(test)]
mod tests {
use crate::ui::widgets::popup::Popup;
use pretty_assertions::assert_eq;
use ratatui::widgets::Block;
#[test]
fn test_popup_new() {
let popup = Popup::new(Block::new(), 50, 50);
assert_eq!(popup.widget, Block::new());
assert_eq!(popup.percent_x, 50);
assert_eq!(popup.percent_y, 50);
}
}