-
-
Notifications
You must be signed in to change notification settings - Fork 213
Closed as duplicate of#603
Description
Problem
The src/utils/markdownEditorUtils.ts file contains 11 utility functions (366 lines of code) that handle critical markdown editing operations in the Monaco editor, but it currently has zero unit test coverage. Previously, the entire utils/ directory only had tests for compression.ts and errorUtils.ts , leaving core editor utilities completely untested.
These functions are responsible for:
- Parsing line content and whitespace
- Detecting markdown prefixes (bullets, blockquotes, headings)
- creating editor edit operations
- toggling list prefixes and wrapped edits
Without such tests, regressions in these utilities could break the markdown editing experience silently.
Solution :
Add comprehensive unit tests for utility functions in markdownEditorUtils.ts and soome edge cases and integeration tests too.
Benefits:
- Improve test coverage: Adding tests for
markdownEditorUtils.tswould significantly increase the project's unit test coverage. - Prevent regressions: These utilities are critical for the markdown editing experience, tests would catch break downs early.
- Enable safe refactoring: with proper test coverage, future contributors can confidently optimize or modify these utilities
- Tests would demonstrate expected function behavior, helping new contributors understand the codebase
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels