Просмотр исходного кода

Fix metrics includes in SandboxedModule

Simon Detheridge 6 лет назад
Родитель
Сommit
495424a94b

+ 2 - 4
services/filestore/test/unit/js/FileConverterTests.js

@@ -29,10 +29,8 @@ describe('FileConverter', function() {
           err() {}
         },
         'metrics-sharelatex': {
-          inc() {},
-          Timer() {
-            return { done() {} }
-          }
+          inc: sinon.stub(),
+          Timer: sinon.stub().returns({ done: sinon.stub() })
         },
         'settings-sharelatex': (this.Settings = {
           commands: {

+ 2 - 4
services/filestore/test/unit/js/LocalFileWriterTests.js

@@ -48,10 +48,8 @@ describe('LocalFileWriter', function() {
         },
         'settings-sharelatex': this.settings,
         'metrics-sharelatex': {
-          inc() {},
-          Timer() {
-            return { done() {} }
-          }
+          inc: sinon.stub(),
+          Timer: sinon.stub().returns({ done: sinon.stub() })
         }
       }
     })