radlinskii / donkeytype

typing test TUI app
MIT License
17 stars 15 forks source link

figure out a way to mock tui::widgets::Widget to test if expected text is rendered #11

Closed radlinskii closed 1 year ago

radlinskii commented 1 year ago

Would be awesome to be able to unit test exactly if the expected message is printed inside the terminal when calling our functions.

It would make some unit tests more useful.

WindowGenerator commented 1 year ago

Hi! Can I take this issue? Btw, for this, we can use smthng like this: https://github.com/ratatui-org/ratatui/blob/main/tests/widgets_paragraph.rs#L12

radlinskii commented 1 year ago

Sure go ahead 🙂