test: add more tests

This commit is contained in:
2025-07-01 22:05:52 +03:00
parent 8ecd9ec8d6
commit 9efeec3890
5 changed files with 138 additions and 1 deletions

14
tests/tui.rs Normal file
View File

@@ -0,0 +1,14 @@
use ratatui::backend::TestBackend;
use ratatui::Terminal;
use traxor::event::EventHandler;
use traxor::tui::Tui;
#[test]
fn test_tui_new() {
let backend = TestBackend::new(10, 10);
let terminal = Terminal::new(backend).unwrap();
let events = EventHandler::new(250); // Dummy tick_rate
let _tui = Tui::new(terminal, events);
// Add assertions for initial state of Tui if applicable
// For example, if Tui has a field that should be initialized to a specific value
}