External services like smtp.gmail.com and xmpp.earth can be unreliable
in CI environments. Added retry logic (up to 3 attempts) to prevent
false test failures due to network issues.
- Replace client.badssl.com tests with unit tests for parseTlsAlertNumber and getTlsAlertName
- Export helper functions for testing
- Keep one integration test for connection success scenario
- Test rejection when expecting TLS alert but connection succeeds
- Test UP status when expected TLS alert is received
- Test rejection when different TLS alert is received than expected
Per CommanderStorm's feedback, refactor the check() method into:
- checkKeyword() - for legacy keyword matching
- checkJsonQuery() - for legacy JSONata query
- checkConditions() - for new conditions system
Also add test cases for MQTT conditions:
- Message condition with contains operator
- Topic condition with equals operator
- Condition mismatch rejection
- Multiple conditions with AND logic
This improves readability and maintainability.