www

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

commit cd6079d869a325d64605f4666ffa09853f7bbe9a
parent dcb3d740bc968609eea46a515b2b2006f61aaf5e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  6 Jun 2017 02:14:23 -0400

Relax last-sync-time check in sync runner test

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

diff --git a/test/tests/syncRunnerTest.js b/test/tests/syncRunnerTest.js @@ -836,6 +836,8 @@ describe("Zotero.Sync.Runner", function () { json: {} }); + var startTime = new Date().getTime(); + yield runner.sync({ onError: e => { throw e }, }); @@ -854,9 +856,9 @@ describe("Zotero.Sync.Runner", function () { 20 ); - // Last sync time should be within the last second + // Last sync time should be within the last few seconds var lastSyncTime = Zotero.Sync.Data.Local.getLastSyncTime(); - assert.isAbove(lastSyncTime.getTime(), new Date().getTime() - 2000); + assert.isAbove(lastSyncTime.getTime(), startTime); assert.isBelow(lastSyncTime.getTime(), new Date().getTime()); })