test(e2e): better SESSION_PASSWORD_NEEDED handling (yet again)
This commit is contained in:
parent
8e9e759008
commit
0cb68f4469
2 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,9 @@ Deno.test('1. authorization', { sanitizeResources: false }, async (t) => {
|
||||||
tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED')
|
tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED')
|
||||||
) {
|
) {
|
||||||
// retry with another number
|
// retry with another number
|
||||||
|
await tg.logOut().catch((err) => {
|
||||||
|
console.error('Failed to log out:', err)
|
||||||
|
})
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
await tg.close()
|
await tg.close()
|
||||||
|
|
|
@ -37,6 +37,9 @@ describe('1. authorization', function () {
|
||||||
tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED')
|
tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED')
|
||||||
) {
|
) {
|
||||||
// retry with another number
|
// retry with another number
|
||||||
|
await tg.logOut().catch((err) => {
|
||||||
|
console.error('Failed to log out:', err)
|
||||||
|
})
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
await tg.close()
|
await tg.close()
|
||||||
|
|
Loading…
Reference in a new issue