Feat improve testing coverage e2e (#1799)

* fix: ensure proper socket closure and await connection termination in tests

* feat(tests): enhance E2E tests for image and video message handling, including downloads and group interactions
This commit is contained in:
João Lucas de Oliveira Lopes
2026-01-17 20:16:24 -03:00
committed by GitHub
parent 0b3b2a88cd
commit e53fa7b8e5
3 changed files with 386 additions and 18 deletions
+7
View File
@@ -45,7 +45,14 @@ export class WebSocketClient extends AbstractSocketClient {
return
}
const closePromise = new Promise<void>(resolve => {
this.socket?.once('close', resolve)
})
this.socket.close()
await closePromise
this.socket = null
}
send(str: string | Uint8Array, cb?: (err?: Error) => void): boolean {