Merge pull request #3942 from overleaf/prettier-trailing-comma
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
This commit is contained in:
@@ -12,11 +12,11 @@ describe('AnalyticsController', function () {
|
||||
|
||||
this.AnalyticsManager = {
|
||||
updateEditingSession: sinon.stub(),
|
||||
recordEvent: sinon.stub()
|
||||
recordEvent: sinon.stub(),
|
||||
}
|
||||
|
||||
this.Features = {
|
||||
hasFeature: sinon.stub().returns(true)
|
||||
hasFeature: sinon.stub().returns(true),
|
||||
}
|
||||
|
||||
this.controller = SandboxedModule.require(modulePath, {
|
||||
@@ -26,14 +26,14 @@ describe('AnalyticsController', function () {
|
||||
.AuthenticationController,
|
||||
'../../infrastructure/Features': this.Features,
|
||||
'../../infrastructure/GeoIpLookup': (this.GeoIpLookup = {
|
||||
getDetails: sinon.stub()
|
||||
})
|
||||
}
|
||||
getDetails: sinon.stub(),
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
this.res = {
|
||||
send() {},
|
||||
sendStatus() {}
|
||||
sendStatus() {},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -41,8 +41,8 @@ describe('AnalyticsController', function () {
|
||||
beforeEach(function () {
|
||||
this.req = {
|
||||
params: {
|
||||
projectId: 'a project id'
|
||||
}
|
||||
projectId: 'a project id',
|
||||
},
|
||||
}
|
||||
this.GeoIpLookup.getDetails = sinon
|
||||
.stub()
|
||||
@@ -64,11 +64,11 @@ describe('AnalyticsController', function () {
|
||||
beforeEach(function () {
|
||||
this.req = {
|
||||
params: {
|
||||
event: 'i_did_something'
|
||||
event: 'i_did_something',
|
||||
},
|
||||
body: 'stuff',
|
||||
sessionID: 'sessionIDHere',
|
||||
session: {}
|
||||
session: {},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -11,19 +11,19 @@ describe('AnalyticsManager', function () {
|
||||
beforeEach(function () {
|
||||
this.fakeUserId = '123abc'
|
||||
this.Settings = {
|
||||
analytics: { enabled: true }
|
||||
analytics: { enabled: true },
|
||||
}
|
||||
this.analyticsEventsQueue = {
|
||||
add: sinon.stub().resolves(),
|
||||
process: sinon.stub().resolves()
|
||||
process: sinon.stub().resolves(),
|
||||
}
|
||||
this.analyticsEditingSessionQueue = {
|
||||
add: sinon.stub().resolves(),
|
||||
process: sinon.stub().resolves()
|
||||
process: sinon.stub().resolves(),
|
||||
}
|
||||
this.onboardingEmailsQueue = {
|
||||
add: sinon.stub().resolves(),
|
||||
process: sinon.stub().resolves()
|
||||
process: sinon.stub().resolves(),
|
||||
}
|
||||
const self = this
|
||||
this.Queues = {
|
||||
@@ -35,15 +35,15 @@ describe('AnalyticsManager', function () {
|
||||
},
|
||||
getOnboardingEmailsQueue: () => {
|
||||
return self.onboardingEmailsQueue
|
||||
}
|
||||
},
|
||||
}
|
||||
this.backgroundRequest = sinon.stub().yields()
|
||||
this.request = sinon.stub().yields()
|
||||
this.AnalyticsManager = SandboxedModule.require(MODULE_PATH, {
|
||||
requires: {
|
||||
'settings-sharelatex': this.Settings,
|
||||
'../../infrastructure/Queues': this.Queues
|
||||
}
|
||||
'../../infrastructure/Queues': this.Queues,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('AnalyticsManager', function () {
|
||||
this.AnalyticsManager.identifyUser(this.fakeUserId, oldUserId)
|
||||
sinon.assert.calledWithMatch(this.analyticsEventsQueue.add, 'identify', {
|
||||
userId: this.fakeUserId,
|
||||
oldUserId
|
||||
oldUserId,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('AnalyticsManager', function () {
|
||||
sinon.assert.calledWithMatch(this.analyticsEventsQueue.add, 'event', {
|
||||
event,
|
||||
userId: this.fakeUserId,
|
||||
segmentation: null
|
||||
segmentation: null,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -92,7 +92,7 @@ describe('AnalyticsManager', function () {
|
||||
sinon.assert.calledWithMatch(this.analyticsEditingSessionQueue.add, {
|
||||
userId: this.fakeUserId,
|
||||
projectId,
|
||||
countryCode
|
||||
countryCode,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user