Merge pull request #3495 from overleaf/ae-prettier-2

Upgrade Prettier to v2

GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
Alf Eaton
2021-04-14 14:17:21 +01:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions

View File

@@ -22,8 +22,8 @@ const modulePath = path.join(
const { expect } = require('chai')
const { ObjectId } = require('mongodb')
describe('InactiveProjectManager', function() {
beforeEach(function() {
describe('InactiveProjectManager', function () {
beforeEach(function () {
this.settings = {}
this.DocstoreManager = {
unarchiveProject: sinon.stub(),
@@ -47,14 +47,14 @@ describe('InactiveProjectManager', function() {
return (this.project_id = '1234')
})
describe('reactivateProjectIfRequired', function() {
beforeEach(function() {
describe('reactivateProjectIfRequired', function () {
beforeEach(function () {
this.project = { active: false }
this.ProjectGetter.getProject.callsArgWith(2, null, this.project)
return this.ProjectUpdateHandler.markAsActive.callsArgWith(1)
})
it('should call unarchiveProject', function(done) {
it('should call unarchiveProject', function (done) {
this.DocstoreManager.unarchiveProject.callsArgWith(1)
return this.InactiveProjectManager.reactivateProjectIfRequired(
this.project_id,
@@ -70,7 +70,7 @@ describe('InactiveProjectManager', function() {
)
})
it('should not mark project as active if error with unarchiving', function(done) {
it('should not mark project as active if error with unarchiving', function (done) {
const error = new Error('error')
this.DocstoreManager.unarchiveProject.callsArgWith(1, error)
return this.InactiveProjectManager.reactivateProjectIfRequired(
@@ -88,7 +88,7 @@ describe('InactiveProjectManager', function() {
)
})
it('should not call unarchiveProject if it is active', function(done) {
it('should not call unarchiveProject if it is active', function (done) {
this.project.active = true
this.DocstoreManager.unarchiveProject.callsArgWith(1)
return this.InactiveProjectManager.reactivateProjectIfRequired(
@@ -106,8 +106,8 @@ describe('InactiveProjectManager', function() {
})
})
describe('deactivateProject', function() {
it('should call unarchiveProject and markAsInactive', function(done) {
describe('deactivateProject', function () {
it('should call unarchiveProject and markAsInactive', function (done) {
this.DocstoreManager.archiveProject.callsArgWith(1)
this.ProjectUpdateHandler.markAsInactive.callsArgWith(1)
@@ -126,7 +126,7 @@ describe('InactiveProjectManager', function() {
)
})
it('should not call markAsInactive if there was a problem archiving in docstore', function(done) {
it('should not call markAsInactive if there was a problem archiving in docstore', function (done) {
this.DocstoreManager.archiveProject.callsArgWith(1, 'errorrr')
this.ProjectUpdateHandler.markAsInactive.callsArgWith(1)