Better backup integration test harness

This commit is contained in:
Fedor Indutny 2024-09-20 20:10:28 -07:00 committed by GitHub
parent 32485abf06
commit a6a838a673
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 147 additions and 198 deletions

View file

@ -20,7 +20,6 @@ type ResolveType = (data: unknown) => void;
export type CIType = {
deviceName: string;
backupData?: Uint8Array;
isBackupIntegration?: boolean;
getConversationId: (address: string | null) => string | null;
getMessagesBySentAt(
sentAt: number
@ -46,14 +45,9 @@ export type CIType = {
export type GetCIOptionsType = Readonly<{
deviceName: string;
backupData?: Uint8Array;
isBackupIntegration?: boolean;
}>;
export function getCI({
deviceName,
backupData,
isBackupIntegration,
}: GetCIOptionsType): CIType {
export function getCI({ deviceName, backupData }: GetCIOptionsType): CIType {
const eventListeners = new Map<string, Array<ResolveType>>();
const completedEvents = new Map<string, Array<unknown>>();
@ -199,7 +193,6 @@ export function getCI({
return {
deviceName,
backupData,
isBackupIntegration,
getConversationId,
getMessagesBySentAt,
handleEvent,