mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 06:09:02 +02:00
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:
committed by
sharelatex
parent
5c32523b53
commit
7588393580
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user