Relax last-sync-time check in sync runner test
This commit is contained in:
parent
dcb3d740bc
commit
cd6079d869
1 changed files with 4 additions and 2 deletions
|
@ -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());
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue