Skip to content

Commit 29bb6e2

Browse files
committed
get rid of no longer useful tests
1 parent d21f377 commit 29bb6e2

File tree

3 files changed

+0
-167
lines changed

3 files changed

+0
-167
lines changed

packages/lib/storage/src/new/read.test.ts

-65
This file was deleted.

packages/lib/storage/src/new/testHelper.ts

-58
Original file line numberDiff line numberDiff line change
@@ -53,61 +53,3 @@ export function makeEnvelop(
5353

5454
export const sign = async (data: string) => sha256(data);
5555
export const testEnvelop = makeEnvelop('from1', 'to1', 'message', Date.now());
56-
57-
const storageEnvelopContainer = {
58-
envelop: testEnvelop,
59-
messageState: MessageState.Created,
60-
};
61-
62-
export const db: Db = {
63-
accountEnsName: 'test.dm3.eth',
64-
updateLocalStorageOnRemoteRead: async <T extends Chunk>(
65-
key: string,
66-
value: T,
67-
) => {},
68-
keyValueStoreLocal: {
69-
read: async <T>(key: string) => {
70-
switch (key) {
71-
// AccountManifest
72-
case await getAccountManifestKey(db):
73-
const accountManifest: AccountManifest = {
74-
conversationListCounter: 101,
75-
key,
76-
};
77-
78-
return accountManifest as T;
79-
80-
// ConversationList page 0
81-
case await getConversationListKey(db, 1):
82-
const conversationList: ConversationList = {
83-
conversationList: ['c1'],
84-
key,
85-
};
86-
return conversationList as T;
87-
88-
// ConversationManifest for test.dm3.eth and alice.eth
89-
case await getConversationManifestKey(db, 'alice.eth'):
90-
const conversationManifest: ConversationManifest = {
91-
key,
92-
isHidden: false,
93-
messageCounter: 101,
94-
};
95-
return conversationManifest as T;
96-
97-
// MessageChunk page 1 for test.dm3.eth and alice.eth
98-
case await getMessageChunkKey(db, 'alice.eth', 1):
99-
const messageChunk: MessageChunk = {
100-
envelopContainer: [storageEnvelopContainer],
101-
key,
102-
};
103-
return messageChunk as T;
104-
105-
default:
106-
return undefined;
107-
}
108-
},
109-
write: async (key: string) => {},
110-
},
111-
sign,
112-
readStrategy: ReadStrategy.LocalFirst,
113-
};

packages/lib/storage/src/new/write.test.ts

-44
This file was deleted.

0 commit comments

Comments
 (0)