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
+2 -2
View File
@@ -605,7 +605,7 @@ export const makeSocket = (config: SocketConfig) => {
})
}
const end = (error: Error | undefined) => {
const end = async (error: Error | undefined) => {
if (closed) {
logger.trace({ trace: error?.stack }, 'connection already closed')
return
@@ -623,7 +623,7 @@ export const makeSocket = (config: SocketConfig) => {
if (!ws.isClosed && !ws.isClosing) {
try {
ws.close()
await ws.close()
} catch {}
}