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

And compare integer timestamps directly instead of relying on implicit Date
coercion
This commit is contained in:
Dan Stillman 2016-07-19 20:21:05 -04:00
parent 5fee2bf4ca
commit 48260e22a9

View file

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