fix(detector): Improve test coverage and adjust detection result handling
This commit is contained in:
@@ -37,11 +37,17 @@
|
||||
- **v2.0.2**: Added service type detection, protocol fingerprinting, and enhanced API
|
||||
|
||||
## Testing
|
||||
- Tests check for closed local ports and open remote ports
|
||||
- Tests verify service type detection for HTTP/HTTPS
|
||||
- Tests check SSH service detection
|
||||
- Comprehensive test suite with 19 tests covering:
|
||||
- Basic port detection (local and remote)
|
||||
- Backward compatibility with `isActiveSimple()`
|
||||
- Service type detection for HTTP, HTTPS, SSH
|
||||
- Error handling and edge cases
|
||||
- Performance benchmarks
|
||||
- Common development ports
|
||||
- Database service detection (MySQL, Redis)
|
||||
- Uses `@git.zone/tstest` with tap-style testing
|
||||
- Example tests: localhost:3008 (expects closed), lossless.com (expects open)
|
||||
- Tests ensure serviceType is always returned when detectServiceType option is true
|
||||
- Handles non-standard URL schemes with default ports
|
||||
|
||||
## Notes
|
||||
- Project uses pnpm for package management
|
||||
|
||||
Reference in New Issue
Block a user