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

@@ -6,8 +6,8 @@ const modulePath = path.join(
)
const sinon = require('sinon')
describe('AnalyticsController', function() {
beforeEach(function() {
describe('AnalyticsController', function () {
beforeEach(function () {
this.AuthenticationController = { getLoggedInUserId: sinon.stub() }
this.AnalyticsManager = {
@@ -42,8 +42,8 @@ describe('AnalyticsController', function() {
}
})
describe('updateEditingSession', function() {
beforeEach(function() {
describe('updateEditingSession', function () {
beforeEach(function () {
this.req = {
params: {
projectId: 'a project id'
@@ -54,7 +54,7 @@ describe('AnalyticsController', function() {
.callsArgWith(1, null, { country_code: 'XY' })
})
it('delegates to the AnalyticsManager', function(done) {
it('delegates to the AnalyticsManager', function (done) {
this.AuthenticationController.getLoggedInUserId.returns('1234')
this.controller.updateEditingSession(this.req, this.res)
@@ -65,8 +65,8 @@ describe('AnalyticsController', function() {
})
})
describe('recordEvent', function() {
beforeEach(function() {
describe('recordEvent', function () {
beforeEach(function () {
this.req = {
params: {
event: 'i_did_something'
@@ -77,7 +77,7 @@ describe('AnalyticsController', function() {
}
})
it('should use the user_id', function(done) {
it('should use the user_id', function (done) {
this.AuthenticationController.getLoggedInUserId.returns('1234')
this.controller.recordEvent(this.req, this.res)
this.AnalyticsManager.recordEvent
@@ -86,7 +86,7 @@ describe('AnalyticsController', function() {
done()
})
it('should use the session id', function(done) {
it('should use the session id', function (done) {
this.controller.recordEvent(this.req, this.res)
this.AnalyticsManager.recordEvent
.calledWith(this.req.sessionID, this.req.params.event, this.req.body)
@@ -95,8 +95,8 @@ describe('AnalyticsController', function() {
})
})
describe('licences', function() {
beforeEach(function() {
describe('licences', function () {
beforeEach(function () {
this.req = {
query: {
resource_id: 1,
@@ -109,7 +109,7 @@ describe('AnalyticsController', function() {
}
})
it('should trigger institutions api to fetch licences graph data', function(done) {
it('should trigger institutions api to fetch licences graph data', function (done) {
this.controller.licences(this.req, this.res)
this.InstitutionsAPI.getInstitutionLicences
.calledWith(