Skip to content

Commit

Permalink
fix test failure by testing what we claim to test
Browse files Browse the repository at this point in the history
  • Loading branch information
pvh committed Dec 18, 2023
1 parent a00768d commit 1b60215
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/automerge-repo/test/remoteHeads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,9 @@ describe("DocHandle.remoteHeads", () => {
).filter(({ type }) => type === "remote-heads-changed")

// we should only be notified of the head changes of doc A
assert.strictEqual(remoteHeadsChangedMessages.length, 1)
assert.strictEqual(
remoteHeadsChangedMessages[0].documentId,
leftTabDocA.documentId
)
const docIds = remoteHeadsChangedMessages.map(d => d.documentId)
const uniqueDocIds = [...new Set(docIds)]
assert.deepStrictEqual(uniqueDocIds, [leftTabDocA.documentId])
})

it("should report remote heads for doc on subscribe if peer already knows them", async () => {
Expand Down

0 comments on commit 1b60215

Please sign in to comment.