Merge pull request #2047 from overleaf/spd-eslint-mocha-arrows

Enforce consistent callback style in mocha tests

GitOrigin-RevId: a64c293dae6926ef5831abe97eaf2044942a5c85
This commit is contained in:
Simon Detheridge
2019-08-07 15:04:04 +01:00
committed by sharelatex
parent 5c32523b53
commit 7588393580
112 changed files with 1461 additions and 1308 deletions
@@ -492,7 +492,7 @@ describe('ProjectEntityUpdateHandler', function() {
})
})
describe('setRootDoc', () =>
describe('setRootDoc', function() {
it('should call Project.update', function() {
const rootDoc_id = 'root-doc-id-123123'
this.ProjectModel.update = sinon.stub()
@@ -500,16 +500,18 @@ describe('ProjectEntityUpdateHandler', function() {
return this.ProjectModel.update
.calledWith({ _id: project_id }, { rootDoc_id })
.should.equal(true)
}))
})
})
describe('unsetRootDoc', () =>
describe('unsetRootDoc', function() {
it('should call Project.update', function() {
this.ProjectModel.update = sinon.stub()
this.ProjectEntityUpdateHandler.unsetRootDoc(project_id)
return this.ProjectModel.update
.calledWith({ _id: project_id }, { $unset: { rootDoc_id: true } })
.should.equal(true)
}))
})
})
describe('addDoc', function() {
describe('adding a doc', function() {