Skip to content

Commit

Permalink
fix some asyncs
Browse files Browse the repository at this point in the history
  • Loading branch information
pvh committed Jan 31, 2025
1 parent b75b1b4 commit 1e4ee1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/automerge-repo/test/Repo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ describe("Repo", () => {

it("throws an error if we try to find a handle with an invalid AutomergeUrl", async () => {
const { repo } = setup()
expect(async () => {
await expect(async () => {
await repo.find<TestDoc>("invalid-url" as unknown as AutomergeUrl)
}).rejects.toThrow("Invalid AutomergeUrl: 'invalid-url'")
})

it("doesn't find a document that doesn't exist", async () => {
const { repo } = setup()
expect(async () => {
await expect(async () => {
await repo.find<TestDoc>(generateAutomergeUrl())
}).rejects.toThrow(/Document (.*) is unavailable/)
})
Expand Down Expand Up @@ -1442,7 +1442,7 @@ describe("Repo", () => {
eventPromise(client.networkSubsystem, "peer"),
])

expect(async () => {
await expect(async () => {
const clientDoc = await client.find(doc.url)
}).rejects.toThrow(/Document (.*) is unavailable/)

Expand Down

0 comments on commit 1e4ee1f

Please sign in to comment.