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:
committed by
GitHub
parent
0b3b2a88cd
commit
e53fa7b8e5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user