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

View File

@@ -7,8 +7,8 @@ const { Project } = require('../helpers/models/Project')
const MODULE_PATH =
'../../../../app/src/Features/Project/ProjectAuditLogHandler'
describe('ProjectAuditLogHandler', function() {
beforeEach(function() {
describe('ProjectAuditLogHandler', function () {
beforeEach(function () {
this.projectId = ObjectId()
this.userId = ObjectId()
this.ProjectMock = sinon.mock(Project)
@@ -19,13 +19,13 @@ describe('ProjectAuditLogHandler', function() {
})
})
afterEach(function() {
afterEach(function () {
this.ProjectMock.restore()
})
describe('addEntry', function() {
describe('success', function() {
beforeEach(async function() {
describe('addEntry', function () {
describe('success', function () {
beforeEach(async function () {
this.dbUpdate = this.ProjectMock.expects('updateOne').withArgs(
{ _id: this.projectId },
{
@@ -53,19 +53,19 @@ describe('ProjectAuditLogHandler', function() {
)
})
it('writes a log', async function() {
it('writes a log', async function () {
this.ProjectMock.verify()
})
})
describe('when the project does not exist', function() {
beforeEach(function() {
describe('when the project does not exist', function () {
beforeEach(function () {
this.ProjectMock.expects('updateOne')
.chain('exec')
.resolves({ nModified: 0 })
})
it('throws an error', async function() {
it('throws an error', async function () {
await expect(
this.ProjectAuditLogHandler.promises.addEntry(
this.projectId,