Commit f4d7a81
Add tests for 100% code coverage
Added tests for two uncovered scenarios in chatController.ts:
- Line 154: Handles popup blocking when window.open returns null
- Line 164: Ignores postMessage events from sources other than the opened popup window
These tests improve the security and robustness of the chat controller by ensuring:
1. The controller gracefully handles popup blockers without throwing errors
2. PostMessage communication is validated to only accept messages from the intended popup window
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add test coverage for chatController and businessHours branches
- Add test for line 175 else branch in chatController.ts (when popup is NOT closed)
- Add test for when nextState is undefined (not in business hours)
- Add test for state reuse when hours haven't changed (object reference stability)
These tests address the coverage gaps identified in code review.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent d286dee commit f4d7a81
File tree
3 files changed
+27002
-3095
lines changed- src/components/HelpMenu
3 files changed
+27002
-3095
lines changed
0 commit comments