Skip to content

Commit

Permalink
Fix pg sequencer test (bluesky-social#777)
Browse files Browse the repository at this point in the history
* fix pg sequencer test

* tidy
  • Loading branch information
dholms authored Apr 7, 2023
1 parent 2aeda0f commit 31d5258
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/pds/tests/sequencer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ describe('sequencer', () => {
}
}

const caughtUp = (outbox: Outbox): (() => boolean) => {
return () => {
return outbox.lastSeen === outbox.sequencer.lastSeen
const caughtUp = (outbox: Outbox): (() => Promise<boolean>) => {
return async () => {
const lastEvt = await outbox.sequencer.curr()
if (!lastEvt) return true
return outbox.lastSeen >= lastEvt.seq
}
}

Expand Down

0 comments on commit 31d5258

Please sign in to comment.