Merge pull request #2356 from overleaf/em-upgrade-test-deps

Upgrade test dependencies

GitOrigin-RevId: 0bda49dea086f525211836b6008f67bafa2bbe48
This commit is contained in:
Eric Mc Sween
2019-11-18 09:37:05 -05:00
committed by sharelatex
parent bdc5360bc0
commit 4f9eb281b7
37 changed files with 1054 additions and 724 deletions

View File

@@ -464,7 +464,7 @@ describe('ProjectEntityUpdateHandler', function() {
it('should return a not found error', function() {
return this.callback
.calledWith(new Errors.NotFoundError())
.calledWith(sinon.match.instanceOf(Errors.NotFoundError))
.should.equal(true)
})
})
@@ -486,7 +486,7 @@ describe('ProjectEntityUpdateHandler', function() {
it('should return a not found error', function() {
return this.callback
.calledWith(new Errors.NotFoundError())
.calledWith(sinon.match.instanceOf(Errors.NotFoundError))
.should.equal(true)
})
})
@@ -562,12 +562,12 @@ describe('ProjectEntityUpdateHandler', function() {
beforeEach(function() {
this.path = '/path/to/doc'
this.newDoc = {
this.newDoc = new this.DocModel({
name: this.docName,
lines: undefined,
_id: doc_id,
rev: 0
}
})
this.DocstoreManager.updateDoc = sinon
.stub()
.yields(null, false, (this.rev = 5))
@@ -599,7 +599,7 @@ describe('ProjectEntityUpdateHandler', function() {
docLines: this.docLines.join('\n')
}
]
return this.DocumentUpdaterHandler.updateProjectStructure
this.DocumentUpdaterHandler.updateProjectStructure
.calledWith(project_id, projectHistoryId, userId, {
newDocs,
newProject: this.project
@@ -1459,7 +1459,7 @@ describe('ProjectEntityUpdateHandler', function() {
it('returns an error', function() {
return this.callback
.calledWith(new Errors.NotFoundError())
.calledWith(sinon.match.instanceOf(Errors.NotFoundError))
.should.equal(true)
})
})
@@ -1716,10 +1716,16 @@ describe('ProjectEntityUpdateHandler', function() {
})
it('should return an error', function() {
const error = new Errors.ProjectHistoryDisabledError(
`project history not enabled for ${project_id}`
expect(this.callback).to.have.been.calledWith(
sinon.match
.instanceOf(Errors.ProjectHistoryDisabledError)
.and(
sinon.match.has(
'message',
`project history not enabled for ${project_id}`
)
)
)
return this.callback.calledWith(error).should.equal(true)
})
})
@@ -1735,10 +1741,16 @@ describe('ProjectEntityUpdateHandler', function() {
})
it('should return an error', function() {
const error = new Errors.ProjectHistoryDisabledError(
`project history not enabled for ${project_id}`
expect(this.callback).to.have.been.calledWith(
sinon.match
.instanceOf(Errors.ProjectHistoryDisabledError)
.and(
sinon.match.has(
'message',
`project history not enabled for ${project_id}`
)
)
)
return this.callback.calledWith(error).should.equal(true)
})
})