From 48260e22a9e64b32f4dc650d653572a93bd11366 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 19 Jul 2016 20:21:05 -0400 Subject: [PATCH] Increase tolerance on last-sync time check to prevent test failures And compare integer timestamps directly instead of relying on implicit Date coercion --- test/tests/syncRunnerTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tests/syncRunnerTest.js b/test/tests/syncRunnerTest.js index 6158feb8e..5c27fb849 100644 --- a/test/tests/syncRunnerTest.js +++ b/test/tests/syncRunnerTest.js @@ -797,8 +797,8 @@ describe("Zotero.Sync.Runner", function () { // Last sync time should be within the last second var lastSyncTime = Zotero.Sync.Data.Local.getLastSyncTime(); - assert.isAbove(lastSyncTime, new Date().getTime() - 1000); - assert.isBelow(lastSyncTime, new Date().getTime()); + assert.isAbove(lastSyncTime.getTime(), new Date().getTime() - 2000); + assert.isBelow(lastSyncTime.getTime(), new Date().getTime()); })