[tui] editor component - write lots of tests for new features that got added
Closed this issue · 2 comments
nazmulidris commented
Add tests for
- select,
- copy,
- cut,
- paste,
- delete,
- undo,
- redo
e0lithic commented
Considerations
- It appears that assertions are encapsulated in functions to promote reuse e.g
line_at_caret
. However, when these test cases fail, the terse summary provided by the panic would point to the function call. If there are multiple such assertions , the user can't tell exactly which of their assertions had failed. As such should I expose these assertions for better debug-ability ? - The test cases use the
EditorEvents
for mocking. However, the mapping between a user event and the generation ofEditorEvent
is still not being verified.
e0lithic commented
Running status for Test-cases :
- select
- copy
- cut
- paste
- delete
- backspace
- undo
- redo