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
@@ -22,8 +22,8 @@ const SandboxedModule = require('sandboxed-module')
const Errors = require('../../../../app/src/Features/Errors/Errors')
const EntityConfigs = require('../../../../app/src/Features/UserMembership/UserMembershipEntityConfigs')
describe('UserMembershipHandler', function() {
beforeEach(function() {
describe('UserMembershipHandler', function () {
beforeEach(function () {
this.user = { _id: ObjectId() }
this.newUser = { _id: ObjectId(), email: 'new-user-email@foo.bar' }
this.fakeEntityId = ObjectId()
@@ -83,8 +83,8 @@ describe('UserMembershipHandler', function() {
}))
})
describe('getEntityWithoutAuthorizationCheck', function() {
it('get publisher', function(done) {
describe('getEntityWithoutAuthorizationCheck', function () {
it('get publisher', function (done) {
return this.UserMembershipHandler.getEntityWithoutAuthorizationCheck(
this.fakeEntityId,
EntityConfigs.publisher,
@@ -99,9 +99,9 @@ describe('UserMembershipHandler', function() {
})
})
describe('getUsers', function() {
describe('group', function() {
it('build view model for all users', function(done) {
describe('getUsers', function () {
describe('group', function () {
it('build view model for all users', function (done) {
return this.UserMembershipHandler.getUsers(
this.subscription,
EntityConfigs.group,
@@ -119,8 +119,8 @@ describe('UserMembershipHandler', function() {
})
})
describe('group mamagers', function() {
it('build view model for all managers', function(done) {
describe('group mamagers', function () {
it('build view model for all managers', function (done) {
return this.UserMembershipHandler.getUsers(
this.subscription,
EntityConfigs.groupManagers,
@@ -135,8 +135,8 @@ describe('UserMembershipHandler', function() {
})
})
describe('institution', function() {
it('build view model for all managers', function(done) {
describe('institution', function () {
it('build view model for all managers', function (done) {
return this.UserMembershipHandler.getUsers(
this.institution,
EntityConfigs.institution,
@@ -152,8 +152,8 @@ describe('UserMembershipHandler', function() {
})
})
describe('createEntity', function() {
it('creates publisher', function(done) {
describe('createEntity', function () {
it('creates publisher', function (done) {
return this.UserMembershipHandler.createEntity(
this.fakeEntityId,
EntityConfigs.publisher,
@@ -166,13 +166,13 @@ describe('UserMembershipHandler', function() {
})
})
describe('addUser', function() {
beforeEach(function() {
describe('addUser', function () {
beforeEach(function () {
return (this.email = this.newUser.email)
})
describe('institution', function() {
it('get user', function(done) {
describe('institution', function () {
it('get user', function (done) {
return this.UserMembershipHandler.addUser(
this.institution,
EntityConfigs.institution,
@@ -184,7 +184,7 @@ describe('UserMembershipHandler', function() {
)
})
it('handle user not found', function(done) {
it('handle user not found', function (done) {
this.UserGetter.getUserByAnyEmail.yields(null, null)
return this.UserMembershipHandler.addUser(
this.institution,
@@ -198,7 +198,7 @@ describe('UserMembershipHandler', function() {
)
})
it('handle user already added', function(done) {
it('handle user already added', function (done) {
this.institution.managerIds.push(this.newUser._id)
return this.UserMembershipHandler.addUser(
this.institution,
@@ -212,7 +212,7 @@ describe('UserMembershipHandler', function() {
)
})
it('add user to institution', function(done) {
it('add user to institution', function (done) {
return this.UserMembershipHandler.addUser(
this.institution,
EntityConfigs.institution,
@@ -226,7 +226,7 @@ describe('UserMembershipHandler', function() {
)
})
it('return user view', function(done) {
it('return user view', function (done) {
return this.UserMembershipHandler.addUser(
this.institution,
EntityConfigs.institution,
@@ -240,9 +240,9 @@ describe('UserMembershipHandler', function() {
})
})
describe('removeUser', function() {
describe('institution', function() {
it('remove user from institution', function(done) {
describe('removeUser', function () {
describe('institution', function () {
it('remove user from institution', function (done) {
return this.UserMembershipHandler.removeUser(
this.institution,
EntityConfigs.institution,
@@ -257,7 +257,7 @@ describe('UserMembershipHandler', function() {
)
})
it('handle admin', function(done) {
it('handle admin', function (done) {
this.subscription.admin_id = this.newUser._id
return this.UserMembershipHandler.removeUser(
this.subscription,