Add extensive test suite for note-tools.ts covering all major operations and error paths. Improves statement coverage from 13.94% to 96.01%. Tests added: - readNote: success, errors, frontmatter parsing - createNote: success, conflict strategies (error/overwrite/rename), parent folder creation - updateNote: success, errors, waypoint protection - deleteNote: soft/permanent delete, dry run, version checking - renameFile: success, errors, version checking, parent folder creation - readExcalidraw: success, non-Excalidraw files, errors - updateFrontmatter: success, field removal, version checking - updateSections: success, invalid ranges, version checking - Path validation for all methods - Empty path validation for all methods Mock enhancements: - Added modify, delete, trash methods to VaultAdapter mock - Added parseYaml function to Obsidian mock for frontmatter testing Coverage improvements for note-tools.ts: - Statements: 13.94% -> 96.01% (+82.07%) - Branches: 5.1% -> 88.44% (+83.34%) - Functions: 27.27% -> 90.9% (+63.63%) - Lines: 13.94% -> 96.4% (+82.46%)
32 KiB
32 KiB