Relax last-sync-time check in sync runner test
This commit is contained in:
parent
dcb3d740bc
commit
cd6079d869
|
@ -836,6 +836,8 @@ describe("Zotero.Sync.Runner", function () {
|
||||||
json: {}
|
json: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var startTime = new Date().getTime();
|
||||||
|
|
||||||
yield runner.sync({
|
yield runner.sync({
|
||||||
onError: e => { throw e },
|
onError: e => { throw e },
|
||||||
});
|
});
|
||||||
|
@ -854,9 +856,9 @@ describe("Zotero.Sync.Runner", function () {
|
||||||
20
|
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();
|
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());
|
assert.isBelow(lastSyncTime.getTime(), new Date().getTime());
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user