mock out metrics in tests

This commit is contained in:
Shane Kilkelly 2017-03-31 11:33:25 +01:00
parent 9a84798293
commit b10f3adf2b
2 changed files with 2 additions and 0 deletions

View file

@ -26,6 +26,7 @@ describe "MongoAWS", ->
"./mongojs" : { db: @db = {}, ObjectId: ObjectId }
"JSONStream": @JSONStream = {}
"readline-stream": @readline = sinon.stub()
'./Metrics': {inc: ()->}
@project_id = ObjectId().toString()
@doc_id = ObjectId().toString()

View file

@ -20,6 +20,7 @@ describe "PackManager", ->
"./LockManager" : {}
"./MongoAWS": {}
"logger-sharelatex": { log: sinon.stub(), error: sinon.stub() }
'./Metrics': {inc: ()->}
@callback = sinon.stub()
@doc_id = ObjectId().toString()
@project_id = ObjectId().toString()