asyouplz_SpeechNote/tests/unit
Taesun Lee 82a4af22ac fix: address Obsidian community plugin review requirements
Required fixes:
- Replace innerHTML/outerHTML with DOM API methods for XSS prevention
- Move inline styles to CSS classes for theme compatibility
- Add instanceof type guards for TFile/TFolder handling
- Remove console.log statements from production code
- Convert fetch() to requestUrl() for cross-platform support

Technical changes:
- Security: All innerHTML/outerHTML replaced with createEl/createDiv/createSvg
  - StatisticsDashboard: DOM-based table/chart rendering
  - UI components: SVG icons built programmatically
  - Error/notification systems: Safe DOM construction

- Styling: Inline styles migrated to CSS classes
  - Added utility classes: .sn-hidden, .sn-fade, .sn-info-box
  - Preserved dynamic styles for progress bars and charts
  - Enhanced theme compatibility

- Type safety: Added file/folder type guards
  - New: src/utils/fs/typeGuards.ts with assertTFile helper
  - Replaced unsafe casts with instanceof checks
  - Improved test mocking with structural typing

- Logging: Cleaned up console statements
  - Removed production console.log calls
  - Preserved console.debug for debug mode
  - Routed logs through Logger class

- Networking: fetch() → requestUrl() migration
  - APIKeyManager: 2 API validation calls converted
  - BatchRequestManager: Updated for Obsidian compatibility

Test improvements:
- E2E: Implemented settings flow mocking (15/15 tests passing)
- Fixed: Settings migration for legacy language codes (korean→ko)
- Fixed: NotificationManager duplicate prevention (timer-based)
- Fixed: WhisperService cancellation logging
- Fixed: FileUploadManager compression fallback
- Fixed: EditorService workspace.off guard

Build verification:
- Bundle size: 148KB (within 150KB target)
- Console statements: Removed from production build
- All 222 tests passing
- Lint:  (167 warnings, no errors)
- TypeCheck: 

Ready for Obsidian review bot re-check.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 13:53:54 +09:00
..
AudioProcessor.test.ts fix: Implement provider-specific file size limits for Deepgram 2025-09-05 02:06:32 +00:00
bugfixes.test.ts fix: address Obsidian community plugin review requirements 2025-10-09 13:53:54 +09:00
deepgram-integration.test.ts feat: Deepgram API Integration - Multi-Provider Speech-to-Text Support 2025-08-28 23:49:21 +09:00
deepgramAdapter.test.ts fix(deepgram): harden release build for public launch 2025-10-01 12:55:59 +09:00
EditorService.test.ts Initial commit: Obsidian Speech-to-Text Plugin 2025-08-25 20:00:43 +09:00
FileUploadManager.test.ts feat: Phase 4 - Testing and Optimization Complete 2025-08-25 22:55:16 +09:00
TextFormatter.test.ts feat: Phase 4 - Testing and Optimization Complete 2025-08-25 22:55:16 +09:00
TranscriptionService.test.ts feat: Phase 4 - Testing and Optimization Complete 2025-08-25 22:55:16 +09:00
WhisperService.test.ts feat: Phase 4 - Testing and Optimization Complete 2025-08-25 22:55:16 +09:00