Promisify tests

GitOrigin-RevId: 6f413f4c5ef8d034b4e94afacdf2d7b43c3a8830
This commit is contained in:
Andrew Rumble
2025-04-24 09:18:42 +01:00
committed by Copybot
parent 30c7a81361
commit 34ae228d99
25 changed files with 3676 additions and 4164 deletions

View File

@@ -430,14 +430,15 @@ describe('ProjectEntityHandler', function () {
})
})
it('should call the callback with the lines, version and rev', function (done) {
this.ProjectEntityHandler.getDoc(projectId, docId, doc => {
this.DocstoreManager.promises.getDoc
.calledWith(projectId, docId)
.should.equal(true)
expect(doc).to.exist
done()
})
it('should call the callback with the lines, version and rev', async function () {
const doc = await this.ProjectEntityHandler.promises.getDoc(
projectId,
docId
)
this.DocstoreManager.promises.getDoc
.calledWith(projectId, docId)
.should.equal(true)
expect(doc).to.exist
})
})