www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 48260e22a9e64b32f4dc650d653572a93bd11366
parent 5fee2bf4ca1b69268f2ffb4b24f4206fc00a86c3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 19 Jul 2016 20:21:05 -0400

Increase tolerance on last-sync time check to prevent test failures

And compare integer timestamps directly instead of relying on implicit Date
coercion

Diffstat:
Mtest/tests/syncRunnerTest.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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()); })