use feed.getId() in tests

This commit is contained in:
Andre Staltz 2023-05-26 14:45:42 +03:00
parent 82fead6c2d
commit 1a2d73cf8d
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ test('sync a feed with goal=all', async (t) => {
}
t.pass('alice has msgs 1..10 from carol')
const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post')
const carolPostsRootHash = alice.db.feed.getId(carolId, 'post')
const carolPostsRootMsg = alice.db.get(carolPostsRootHash)
await p(bob.db.add)(carolPostsRootMsg, carolPostsRootHash)
@ -155,7 +155,7 @@ test('sync a feed with goal=newest', async (t) => {
}
t.pass('alice has msgs 1..10 from carol')
const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post')
const carolPostsRootHash = alice.db.feed.getId(carolId, 'post')
const carolPostsRootMsg = alice.db.get(carolPostsRootHash)
await p(bob.db.add)(carolPostsRootMsg, carolPostsRootHash)
@ -245,7 +245,7 @@ test('sync a feed with goal=newest but too far behind', async (t) => {
carolMsgs.push(rec.msg)
}
const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post')
const carolPostsRootHash = alice.db.feed.getId(carolId, 'post')
const carolPostsRootMsg = alice.db.get(carolPostsRootHash)
const algo = new Algorithm(alice)

View File

@ -114,7 +114,7 @@ test('sync a thread where both peers have portions', async (t) => {
data: { text: 'A' },
keys: aliceKeys,
})
const rootHashA = alice.db.feed.getRoot(aliceId, 'post')
const rootHashA = alice.db.feed.getId(aliceId, 'post')
const rootMsgA = alice.db.get(rootHashA)
await p(bob.db.add)(rootMsgA, rootHashA)
@ -135,7 +135,7 @@ test('sync a thread where both peers have portions', async (t) => {
tangles: [startA.hash],
keys: bobKeys,
})
const rootHashB = bob.db.feed.getRoot(bobId, 'post')
const rootHashB = bob.db.feed.getId(bobId, 'post')
const rootMsgB = bob.db.get(rootHashB)
await p(alice.db.add)(rootMsgB, rootHashB)