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
@@ -18,8 +18,8 @@ const { assert, expect } = require('chai')
const modulePath =
'../../../../app/src/Features/Subscription/SubscriptionGroupHandler'
describe('SubscriptionGroupHandler', function() {
beforeEach(function() {
describe('SubscriptionGroupHandler', function () {
beforeEach(function () {
this.adminUser_id = '12321'
this.newEmail = 'bob@smith.com'
this.user_id = '3121321'
@@ -105,8 +105,8 @@ describe('SubscriptionGroupHandler', function() {
}))
})
describe('removeUserFromGroup', function() {
it('should call the subscription updater to remove the user', function(done) {
describe('removeUserFromGroup', function () {
it('should call the subscription updater to remove the user', function (done) {
return this.Handler.removeUserFromGroup(
this.adminUser_id,
this.user._id,
@@ -120,8 +120,8 @@ describe('SubscriptionGroupHandler', function() {
})
})
describe('replaceUserReferencesInGroups', function() {
beforeEach(function(done) {
describe('replaceUserReferencesInGroups', function () {
beforeEach(function (done) {
this.oldId = 'ba5eba11'
this.newId = '5ca1ab1e'
return this.Handler.replaceUserReferencesInGroups(
@@ -131,13 +131,13 @@ describe('SubscriptionGroupHandler', function() {
)
})
it('replaces the admin_id', function() {
it('replaces the admin_id', function () {
return this.Subscription.updateOne
.calledWith({ admin_id: this.oldId }, { admin_id: this.newId })
.should.equal(true)
})
it('replaces the manager_ids', function() {
it('replaces the manager_ids', function () {
this.Subscription.updateMany
.calledWith(
{ manager_ids: 'ba5eba11' },
@@ -153,7 +153,7 @@ describe('SubscriptionGroupHandler', function() {
.should.equal(true)
})
it('replaces the member ids', function() {
it('replaces the member ids', function () {
this.Subscription.updateMany
.calledWith(
{ member_ids: this.oldId },
@@ -170,12 +170,12 @@ describe('SubscriptionGroupHandler', function() {
})
})
describe('isUserPartOfGroup', function() {
beforeEach(function() {
describe('isUserPartOfGroup', function () {
beforeEach(function () {
return (this.subscription_id = '123ed13123')
})
it('should return true when user is part of subscription', function(done) {
it('should return true when user is part of subscription', function (done) {
this.SubscriptionLocator.getSubscriptionByMemberIdAndId.callsArgWith(
2,
null,
@@ -191,7 +191,7 @@ describe('SubscriptionGroupHandler', function() {
)
})
it('should return false when no subscription is found', function(done) {
it('should return false when no subscription is found', function (done) {
this.SubscriptionLocator.getSubscriptionByMemberIdAndId.callsArgWith(
2,
null
@@ -207,12 +207,12 @@ describe('SubscriptionGroupHandler', function() {
})
})
describe('getTotalConfirmedUsersInGroup', function() {
describe('for existing subscriptions', function() {
beforeEach(function() {
describe('getTotalConfirmedUsersInGroup', function () {
describe('for existing subscriptions', function () {
beforeEach(function () {
return (this.subscription.member_ids = ['12321', '3121321'])
})
it('should call the subscription locator and return 2 users', function(done) {
it('should call the subscription locator and return 2 users', function (done) {
return this.Handler.getTotalConfirmedUsersInGroup(
this.subscription_id,
(err, count) => {
@@ -225,8 +225,8 @@ describe('SubscriptionGroupHandler', function() {
)
})
})
describe('for nonexistent subscriptions', function() {
it('should return undefined', function(done) {
describe('for nonexistent subscriptions', function () {
it('should return undefined', function (done) {
return this.Handler.getTotalConfirmedUsersInGroup(
'fake-id',
(err, count) => {