Merge pull request #3942 from overleaf/prettier-trailing-comma
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
This commit is contained in:
@@ -17,8 +17,8 @@ describe('NotificationsBuilder', function () {
|
||||
requires: {
|
||||
'./NotificationsHandler': this.handler,
|
||||
'settings-sharelatex': this.settings,
|
||||
request: this.request
|
||||
}
|
||||
request: this.request,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('NotificationsBuilder', function () {
|
||||
enrolment_ad_html: 'v1 ad content',
|
||||
is_university: true,
|
||||
portal_slug: null,
|
||||
sso_enabled: false
|
||||
sso_enabled: false,
|
||||
}
|
||||
this.request.callsArgWith(1, null, { statusCode: 200 }, this.body)
|
||||
})
|
||||
@@ -44,7 +44,7 @@ describe('NotificationsBuilder', function () {
|
||||
university_name: this.body.name,
|
||||
content: this.body.enrolment_ad_html,
|
||||
ssoEnabled: false,
|
||||
portalPath: undefined
|
||||
portalPath: undefined,
|
||||
}
|
||||
this.handler.createNotification
|
||||
.calledWith(
|
||||
@@ -66,7 +66,7 @@ describe('NotificationsBuilder', function () {
|
||||
enrolment_ad_html: 'v1 ad content',
|
||||
is_university: true,
|
||||
portal_slug: 'stanford',
|
||||
sso_enabled: true
|
||||
sso_enabled: true,
|
||||
}
|
||||
this.request.callsArgWith(1, null, { statusCode: 200 }, this.body)
|
||||
})
|
||||
@@ -80,7 +80,7 @@ describe('NotificationsBuilder', function () {
|
||||
university_name: this.body.name,
|
||||
content: this.body.enrolment_ad_html,
|
||||
ssoEnabled: true,
|
||||
portalPath: '/edu/stanford'
|
||||
portalPath: '/edu/stanford',
|
||||
}
|
||||
this.handler.createNotification
|
||||
.calledWith(
|
||||
|
||||
@@ -26,30 +26,30 @@ describe('NotificationsController', function () {
|
||||
beforeEach(function () {
|
||||
this.handler = {
|
||||
getUserNotifications: sinon.stub().callsArgWith(1),
|
||||
markAsRead: sinon.stub().callsArgWith(2)
|
||||
markAsRead: sinon.stub().callsArgWith(2),
|
||||
}
|
||||
this.req = {
|
||||
params: {
|
||||
notification_id
|
||||
notification_id,
|
||||
},
|
||||
session: {
|
||||
user: {
|
||||
_id: user_id
|
||||
}
|
||||
_id: user_id,
|
||||
},
|
||||
},
|
||||
i18n: {
|
||||
translate() {}
|
||||
}
|
||||
translate() {},
|
||||
},
|
||||
}
|
||||
this.AuthenticationController = {
|
||||
getLoggedInUserId: sinon.stub().returns(this.req.session.user._id)
|
||||
getLoggedInUserId: sinon.stub().returns(this.req.session.user._id),
|
||||
}
|
||||
return (this.controller = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
'./NotificationsHandler': this.handler,
|
||||
'../Authentication/AuthenticationController': this
|
||||
.AuthenticationController
|
||||
}
|
||||
.AuthenticationController,
|
||||
},
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('NotificationsController', function () {
|
||||
body.should.deep.equal(allNotifications)
|
||||
this.handler.getUserNotifications.calledWith(user_id).should.equal(true)
|
||||
return done()
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -74,7 +74,7 @@ describe('NotificationsController', function () {
|
||||
.calledWith(user_id, notification_id)
|
||||
.should.equal(true)
|
||||
return done()
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -31,10 +31,10 @@ describe('NotificationsHandler', function () {
|
||||
return (this.handler = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
'settings-sharelatex': {
|
||||
apis: { notifications: { url: notificationUrl } }
|
||||
apis: { notifications: { url: notificationUrl } },
|
||||
},
|
||||
request: this.request
|
||||
}
|
||||
request: this.request,
|
||||
},
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('NotificationsHandler', function () {
|
||||
uri: `${notificationUrl}/user/${user_id}`,
|
||||
json: true,
|
||||
timeout: 1000,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
}
|
||||
this.request.calledWith(getOpts).should.equal(true)
|
||||
return done()
|
||||
@@ -84,10 +84,10 @@ describe('NotificationsHandler', function () {
|
||||
const opts = {
|
||||
uri: `${notificationUrl}/user/${user_id}`,
|
||||
json: {
|
||||
key: this.key
|
||||
key: this.key,
|
||||
},
|
||||
timeout: 1000,
|
||||
method: 'DELETE'
|
||||
method: 'DELETE',
|
||||
}
|
||||
this.request.calledWith(opts).should.equal(true)
|
||||
return done()
|
||||
@@ -118,7 +118,7 @@ describe('NotificationsHandler', function () {
|
||||
key: this.key,
|
||||
templateKey: this.templateKey,
|
||||
messageOpts: this.messageOpts,
|
||||
forceCreate: true
|
||||
forceCreate: true,
|
||||
}
|
||||
assert.deepEqual(args.json, expectedJson)
|
||||
return done()
|
||||
@@ -150,7 +150,7 @@ describe('NotificationsHandler', function () {
|
||||
templateKey: this.templateKey,
|
||||
messageOpts: this.messageOpts,
|
||||
expires: this.expiry,
|
||||
forceCreate: true
|
||||
forceCreate: true,
|
||||
}
|
||||
assert.deepEqual(args.json, expectedJson)
|
||||
return done()
|
||||
@@ -170,7 +170,7 @@ describe('NotificationsHandler', function () {
|
||||
const opts = {
|
||||
uri: `${notificationUrl}/key/${this.key}`,
|
||||
timeout: 1000,
|
||||
method: 'DELETE'
|
||||
method: 'DELETE',
|
||||
}
|
||||
this.request.calledWith(opts).should.equal(true)
|
||||
return done()
|
||||
|
||||
Reference in New Issue
Block a user