Skip to content

Commit

Permalink
test: Fix tests to use the new api
Browse files Browse the repository at this point in the history
  • Loading branch information
ducdetronquito committed Sep 27, 2023
1 parent 188bacb commit 69432e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/Server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ describe("Sync Server Tests", () => {
doc.test = "hello world"
})

const handle2 = repo2.find(handle.documentId)

handle2.value().then((doc) => {
const handle2 = repo2.find(handle.url)
handle2.doc().then((doc) => {
assert.equal(doc.test, "hello world")
done()
})
Expand All @@ -74,11 +74,11 @@ describe("Sync Server Tests", () => {

assert.equal(Object.keys(repo2.handles).length, 0)

const handle2 = repo2.find(handle.documentId)
const handle2 = repo2.find(handle.url)

assert.equal(Object.keys(repo2.handles).length, 1)

const doc = await handle2.value()
const doc = await handle2.doc()

assert.equal(doc.test, "hello world")
})
Expand Down

0 comments on commit 69432e2

Please sign in to comment.