mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[GH-ISSUE #18] Use fakewidget.Draw in tests that use the fake widget #18
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mum4k on GitHub (Apr 21, 2018).
Original GitHub issue: https://github.com/mum4k/termdash/issues/18
All tests that use the fake widget should use fakewidget.Draw or fakewidget.MustDraw when creating the expected value.
That way changes or enhancements to fakewidget will be limited to that package.
This is an example of a test that doesn't use MustDraw and instead uses primitives directly (MustBorder, MustText):
github.com/mum4k/termdash@f72f1c2fa8/container/draw_test.go (L67)This is an example of a test that uses the desired helper instead of draw primitives:
github.com/mum4k/termdash@6b9ac6b0a5/termdash_test.go (L168)