Replies: 2 comments
-
bubblezone itself doesn't specifically control how a multi-model bubbletea application should be structured/logically organized. I simply split up that example as it was a bit too large (coming from the full example provided by lipgloss itself) -- the I think some further effort will need to be done at the core of bubbletea (or a companion library) around standardized approaches to multi-model applications. I wasn't aware of teatest -- I will take a look at it and see if there is any use with it and this library (either for testing the library itself, or the examples). At this time, I feel like the tests I have are quite sufficient, as they are meant to only test the zone marker functionality and its impact to raw strings, not models in a larger scope. Doing it at the string level is more work, but it ensures exact escape code ordering/wrapping/byte-for-byte equality, where a higher level test might not, and thus is more accurate. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your detailed feedback @lrstanley
I'll think you are exactly right. I'll post on the bubbletea discussions page about it! |
Beta Was this translation helpful? Give feedback.
-
Not sure if you've seen the new
teatest
package in BubbleTea (currently on the test branch)https://github.com/charmbracelet/bubbletea/blob/test/teatest/teatest.go
What do you think of adding unit-tests to each of the components in your excellent
full-lipgloss
example?https://github.com/lrstanley/bubblezone/tree/master/examples/full-lipgloss
The way your full-lipgloss example already includes many other models was a concept I was looking for but did not find in the wish/bubbletea/bubbles examples.
Unfortunately the way
teatest
works right now, it's not directly compatible withbubblezone
. Here's an example test:https://github.com/charmbracelet/bubbletea/blob/test/examples/simple/main_test.go
How do you think Unit Testing is best implemented for multi model applications using bubblezone?
If unit testing is not feasible for now, is there a way that the individual models of
examples/full-lipgloss
can be executed so that each can be manually iteratively tested during development?Beta Was this translation helpful? Give feedback.
All reactions