Skip to content

Commit

Permalink
add and adjust some timers in the tests but this points to some missi…
Browse files Browse the repository at this point in the history
…ng API i suspect
  • Loading branch information
pvh committed Nov 13, 2023
1 parent c389f58 commit 324a093
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/automerge-repo/test/Repo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ describe("Repo", () => {
bob2Repo.networkSubsystem.on("message", m => {
bob2SyncMessages++
})
await pause(500)
await pause(100)

// repo has stored sync state for charlie so we should see one sync messages
assert.strictEqual(bob2SyncMessages, 1)
Expand Down Expand Up @@ -893,7 +893,7 @@ describe("Repo", () => {
})

// pause to let the sync happen
await pause(500)
await pause(100)

const charlieHeads = A.getHeads(charlieHandle.docSync())
const bobHeads = A.getHeads(handle.docSync())
Expand All @@ -915,6 +915,9 @@ describe("Repo", () => {
it("can report the connected peers", async () => {
const { bobRepo, charlieRepo, teardown } = await setup()

// pause to let the connections happen
await pause(1)

assert.deepStrictEqual(bobRepo.peers, ["alice", "charlie"])
assert.deepStrictEqual(charlieRepo.peers, ["bob"])

Expand Down

0 comments on commit 324a093

Please sign in to comment.