Stub out noisy/slow logger-sharelatex and mongojs modules in tests

This commit is contained in:
James Allen 2015-09-25 13:46:20 +01:00
parent 23dfe68cb8
commit 2a03591030
2 changed files with 2 additions and 1 deletions

View file

@ -1,7 +1,6 @@
{db, ObjectId} = require "./mongojs"
PackManager = require "./PackManager"
async = require "async"
logger = require "logger-sharelatex"
module.exports = MongoManager =
getLastCompressedUpdate: (doc_id, callback = (error, update) ->) ->

View file

@ -15,6 +15,8 @@ describe "MongoManager", ->
"./mongojs" : { db: @db = {}, ObjectId: ObjectId }
"./PackManager" : SandboxedModule.require packModulePath, requires:
"./LockManager" : {}
"./mongojs": {db: bson: BSON = sinon.stub(), ObjectId}
"logger-sharelatex": {}
@callback = sinon.stub()
@doc_id = ObjectId().toString()
@project_id = ObjectId().toString()