From b10f3adf2b507d91deb870ae1816eae9491413c1 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 31 Mar 2017 11:33:25 +0100 Subject: [PATCH] mock out metrics in tests --- .../track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee | 1 + .../test/unit/coffee/PackManager/PackManagerTests.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee b/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee index 6c3cf774a9..2da3fdaaef 100644 --- a/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee +++ b/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee @@ -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() diff --git a/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee b/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee index d1d7d898d6..63309a1ff0 100644 --- a/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee +++ b/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee @@ -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()