Fixes Windows CI hang caused by:
- Missing wsPingSetInterval cleanup in cleanupChargingStation()
- Removed ping()/pong() methods that ChargingStation.ts still calls
The WebSocket ping interval was never cleared during test cleanup,
keeping the Node.js event loop alive indefinitely on Windows.
station.heartbeatSetInterval = undefined
}
+ // Stop WebSocket ping timer
+ if (station.wsPingSetInterval != null) {
+ clearInterval(station.wsPingSetInterval)
+ station.wsPingSetInterval = undefined
+ }
+
// Close WebSocket connection
if (station.wsConnection != null) {
try {
return this.sentMessages.map(msg => JSON.parse(msg) as unknown)
}
+ /**
+ * Ping the server (no-op in mock)
+ */
+ public ping (): void {
+ // No-op for tests
+ }
+
+ /**
+ * Pong response (no-op in mock)
+ */
+ public pong (): void {
+ // No-op for tests
+ }
+
/**
* Send a message through the WebSocket
* @param data - Message to send