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