From 2ceb6cdb2e46a52cde2089ce726df7790ed04a4c Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 3 May 2024 21:11:02 -0300 Subject: [PATCH] fix: lint --- lib/utils.js | 4 ++-- tests/models/methods.js | 2 +- tests/models/pubsub.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 3def329a..2c1b5ffc 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -124,8 +124,8 @@ export function calculateWaitedOnTime (messageQueue, startedTime) { messageQueue.toArray().forEach(function (msg) { if (msg._waitEventId) { waitedOnTime += now - msg._waitEventId.at; - if(msg._waitEventId.at < startedTime) { - waitedOnTime -= startedTime - msg._waitEventId.at + if (msg._waitEventId.at < startedTime) { + waitedOnTime -= startedTime - msg._waitEventId.at; } } }); diff --git a/tests/models/methods.js b/tests/models/methods.js index c6173350..e86b2dd5 100644 --- a/tests/models/methods.js +++ b/tests/models/methods.js @@ -221,7 +221,7 @@ Tinytest.addAsync('Models - Method - Waited On - track waitedOn without wait tim console.log('slow method end'); }); let unblockedMethod = RegisterMethod(function () { - this.unblock() + this.unblock(); Meteor._sleepForMs(100); console.log('slow method end'); }); diff --git a/tests/models/pubsub.js b/tests/models/pubsub.js index 5466748c..54a0e6f7 100644 --- a/tests/models/pubsub.js +++ b/tests/models/pubsub.js @@ -780,7 +780,7 @@ Tinytest.addAsync('Models - PubSub - Waited On - track wait time of queued messa }); Meteor.publish('tinytest-unblock-fast', function () { - console.log('unblock-fast-pub') + console.log('unblock-fast-pub'); this.unblock(); Meteor._sleepForMs(100); this.ready();