Add conversion tests for registration errors

This commit is contained in:
Alex Bakon
2025-04-01 17:18:00 -04:00
committed by GitHub
parent f7d01c201d
commit 9d3f2e0f54
8 changed files with 358 additions and 31 deletions

View File

@@ -20,8 +20,6 @@ import {
Environment,
Net,
newNativeHandle,
RegistrationService,
RegistrationSessionState,
SIGNAL_TLS_PROXY_SCHEME,
TokioAsyncContext,
UnauthenticatedChatConnection,
@@ -878,21 +876,3 @@ describe('cdsi lookup', () => {
});
});
});
describe('registration client', () => {
describe('registration session conversion', () => {
const expectedSession: RegistrationSessionState = {
allowedToRequestCode: true,
verified: true,
nextCallSecs: 123,
nextSmsSecs: 456,
nextVerificationAttemptSecs: 789,
requestedInformation: new Set(['pushChallenge']),
};
const convertedSession = RegistrationService._convertNativeSessionState(
newNativeHandle(Native.TESTING_RegistrationSessionInfoConvert())
);
expect(convertedSession).to.deep.equal(expectedSession);
});
});