mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Merge pull request #3495 from overleaf/ae-prettier-2
Upgrade Prettier to v2 GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user