- Merge 5 test files (900+ lines) into 3 focused files
-
mdtail.test.js- Core functionality and unit tests (290 lines) -
mdtail.integration.test.js- Full flow and integration tests (317 lines) -
mdtail.edge.test.js- Edge cases and branch coverage scenarios (247 lines) - Remove redundant tests while maintaining 100% coverage
- Consolidate mock setup and teardown logic
- Create
lib/display.jsmodule with Display class (98 lines) - Move
formatContent(),renderTabs(),showNavigation()methods - Consolidate console.log calls into single
render()method - Extract ANSI escape codes to constants (HIDE_CURSOR, SHOW_CURSOR, etc.)
- Create
lib/fileManager.jsmodule with FileManager class (80 lines) - Move
expandFiles(),validateFiles(),startWatching(),stopWatching() - Implement better file validation with custom error messages
- Convert from CommonJS to ES6 modules (kept CommonJS for compatibility)
- Use async/await for all file operations instead of sync methods
- Use template literals for multi-line string formatting
- Add proper TypeScript definitions (index.d.ts)
- Create custom error classes (FileNotFoundError, InvalidMarkdownError)
- Implement graceful degradation for missing terminal features
- Better error messages with suggestions for fixes
- Add chalk library for colored output
- Consider blessed or ink for richer TUI with mouse support
- Add commander.js for robust CLI argument parsing
- Support for themes and color customization
- Publish to npm registry