Commit graph

6 commits

Author SHA1 Message Date
f0db6d9589 add public domain license and headers to all source files 2026-02-22 22:27:09 -05:00
133daabd77 add jest-free testing framework: comprehensive integration, modal, and simple test suites with improved error handling 2025-07-11 14:56:57 -04:00
2315e476c8 feat: add comprehensive session error regression tests to prevent modal failures
Add 10 new regression tests in Section 10 targeting specific errors encountered:

🚨 Session Error Prevention:
- Async generator wrapper validation (prevents "not iterable" errors)
- Dynamic import wrapper error handling (prevents undefined function errors)
- Module import path verification (prevents wrong module imports)
- Variable scope isolation (prevents direct chatHistory access)
- Runtime function availability (prevents window.function undefined errors)
- Module export consistency (prevents import/export mismatches)
- Async/await pattern validation (prevents promise handling errors)
- Error boundary patterns (prevents cascading failures)
- Generator function delegation (prevents yield* delegation errors)
- Function signature compatibility (prevents parameter mismatches)

These tests specifically target the JavaScript errors we encountered:
- sendMessageWithCustomHistory(...) is not iterable
- fetchModelsFromEndpoints is not a function
- loadConversationHistory is not a function
- clearConversationHistory is not a function
- saveConversationHistory is not a function
- getSelectedModel is not a function
- chatHistory is not defined
- window.openTTSModal is not a function
- window.openTranslateModal is not a function

All tests validate current fixes and prevent regression of these specific patterns.
2025-07-03 18:32:03 -04:00
bfdb742d9e feat: add comprehensive modal error regression tests and fix saveConversationHistory import
- Add 8 new modal-specific integration tests covering all session errors:
  * Modal import function validation
  * Correct import path verification
  * Generator function wrapper correctness
  * Window global function exports
  * Safe chat history handling
  * Error handling patterns
  * Export/import matching
  * Circular dependency prevention
- Fix saveConversationHistory import from ./chat.js to ./storage.js
- Window functions openTTSModal/openTranslateModal already properly exported in ui.js
2025-07-03 18:27:11 -04:00
aa62dacb8e fix: add missing handleTTS and downloadAudio exports to tts.js 2025-07-03 17:05:36 -04:00
2d4b52399c fix: add toggleUncloseaiEmbeddedModal + integration tests
- Add missing toggleUncloseaiEmbeddedModal function for floating button
- Create comprehensive integration test suite (15 tests)
- Tests verify all imports/exports work correctly
- Tests ensure proper module structure after refactoring
- All tests passing  - refactoring is solid!
2025-07-03 16:43:38 -04:00