mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 07:58:46 +01:00
Move getDefaultConversation into a shared test folder
This commit is contained in:
committed by
Scott Nonnenberg
parent
dd0ea6b3fe
commit
8e7379a591
20
ts/test-both/helpers/getDefaultConversation.ts
Normal file
20
ts/test-both/helpers/getDefaultConversation.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
import { ConversationType } from '../../state/ducks/conversations';
|
||||
|
||||
export function getDefaultConversation(
|
||||
overrideProps: Partial<ConversationType>
|
||||
): ConversationType {
|
||||
return {
|
||||
id: 'guid-1',
|
||||
lastUpdated: Date.now(),
|
||||
markedUnread: Boolean(overrideProps.markedUnread),
|
||||
e164: '+1300555000',
|
||||
title: 'Alice',
|
||||
type: 'direct' as const,
|
||||
uuid: generateUuid(),
|
||||
...overrideProps,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user