mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 12:51:35 +02:00
Merge pull request #3495 from overleaf/ae-prettier-2
Upgrade Prettier to v2 GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
@@ -18,8 +18,8 @@ const modulePath = require('path').join(
|
||||
'../../../../app/src/Features/SystemMessages/SystemMessageManager.js'
|
||||
)
|
||||
|
||||
describe('SystemMessageManager', function() {
|
||||
beforeEach(function() {
|
||||
describe('SystemMessageManager', function () {
|
||||
beforeEach(function () {
|
||||
this.messages = ['messages-stub']
|
||||
this.SystemMessage = {
|
||||
find: sinon.stub().yields(null, this.messages)
|
||||
@@ -32,32 +32,32 @@ describe('SystemMessageManager', function() {
|
||||
return (this.callback = sinon.stub())
|
||||
})
|
||||
|
||||
it('should look the messages up in the database on import', function() {
|
||||
it('should look the messages up in the database on import', function () {
|
||||
sinon.assert.called(this.SystemMessage.find)
|
||||
})
|
||||
|
||||
describe('getMessage', function() {
|
||||
beforeEach(function() {
|
||||
describe('getMessage', function () {
|
||||
beforeEach(function () {
|
||||
this.SystemMessageManager._cachedMessages = this.messages
|
||||
return this.SystemMessageManager.getMessages(this.callback)
|
||||
})
|
||||
|
||||
it('should return the messages', function() {
|
||||
it('should return the messages', function () {
|
||||
return this.callback.calledWith(null, this.messages).should.equal(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('clearMessages', function() {
|
||||
beforeEach(function() {
|
||||
describe('clearMessages', function () {
|
||||
beforeEach(function () {
|
||||
this.SystemMessage.deleteMany = sinon.stub().callsArg(1)
|
||||
return this.SystemMessageManager.clearMessages(this.callback)
|
||||
})
|
||||
|
||||
it('should remove the messages from the database', function() {
|
||||
it('should remove the messages from the database', function () {
|
||||
return this.SystemMessage.deleteMany.calledWith({}).should.equal(true)
|
||||
})
|
||||
|
||||
it('should return the callback', function() {
|
||||
it('should return the callback', function () {
|
||||
return this.callback.called.should.equal(true)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user