mirror of https://codeberg.org/pzp/pzp-sync.git
use feed.getId() in tests
This commit is contained in:
parent
82fead6c2d
commit
1a2d73cf8d
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue