Merge pull request #12206 from overleaf/em-camel-case-docupdater

Camel case variables in document-updater

GitOrigin-RevId: 76ad0921cc059878f21639547fad1bff1913bc8b
This commit is contained in:
Eric Mc Sween
2023-03-22 09:04:37 +00:00
committed by Copybot
parent 03f45c02c3
commit 3831416c2f
36 changed files with 406 additions and 456 deletions
@@ -1,5 +1,4 @@
/* eslint-disable
camelcase,
no-return-assign,
no-unused-vars,
*/
@@ -68,9 +67,9 @@ describe('ProjectManager - flushAndDeleteProject', function () {
})
it('should delete each doc in the project', function () {
return Array.from(this.doc_ids).map(doc_id =>
return Array.from(this.doc_ids).map(docId =>
this.DocumentManager.flushAndDeleteDocWithLock
.calledWith(this.project_id, doc_id, {})
.calledWith(this.project_id, docId, {})
.should.equal(true)
)
})
@@ -97,8 +96,8 @@ describe('ProjectManager - flushAndDeleteProject', function () {
.stub()
.callsArgWith(1, null, this.doc_ids)
this.DocumentManager.flushAndDeleteDocWithLock = sinon.spy(
(project_id, doc_id, options, callback) => {
if (doc_id === 'doc-id-1') {
(projectId, docId, options, callback) => {
if (docId === 'doc-id-1') {
return callback(
(this.error = new Error('oops, something went wrong'))
)
@@ -118,9 +117,9 @@ describe('ProjectManager - flushAndDeleteProject', function () {
})
it('should still flush each doc in the project', function () {
return Array.from(this.doc_ids).map(doc_id =>
return Array.from(this.doc_ids).map(docId =>
this.DocumentManager.flushAndDeleteDocWithLock
.calledWith(this.project_id, doc_id, {})
.calledWith(this.project_id, docId, {})
.should.equal(true)
)
})
@@ -1,5 +1,4 @@
/* eslint-disable
camelcase,
no-return-assign,
no-unused-vars,
*/
@@ -66,9 +65,9 @@ describe('ProjectManager - flushProject', function () {
})
it('should flush each doc in the project', function () {
return Array.from(this.doc_ids).map(doc_id =>
return Array.from(this.doc_ids).map(docId =>
this.DocumentManager.flushDocIfLoadedWithLock
.calledWith(this.project_id, doc_id)
.calledWith(this.project_id, docId)
.should.equal(true)
)
})
@@ -89,11 +88,11 @@ describe('ProjectManager - flushProject', function () {
.stub()
.callsArgWith(1, null, this.doc_ids)
this.DocumentManager.flushDocIfLoadedWithLock = sinon.spy(
(project_id, doc_id, callback) => {
(projectId, docId, callback) => {
if (callback == null) {
callback = function () {}
}
if (doc_id === 'doc-id-1') {
if (docId === 'doc-id-1') {
return callback(
(this.error = new Error('oops, something went wrong'))
)
@@ -112,9 +111,9 @@ describe('ProjectManager - flushProject', function () {
})
it('should still flush each doc in the project', function () {
return Array.from(this.doc_ids).map(doc_id =>
return Array.from(this.doc_ids).map(docId =>
this.DocumentManager.flushDocIfLoadedWithLock
.calledWith(this.project_id, doc_id)
.calledWith(this.project_id, docId)
.should.equal(true)
)
})