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:
parent
5fee2bf4ca
commit
48260e22a9
1 changed files with 2 additions and 2 deletions
|
@ -797,8 +797,8 @@ describe("Zotero.Sync.Runner", function () {
|
||||||
|
|
||||||
// Last sync time should be within the last second
|
// Last sync time should be within the last second
|
||||||
var lastSyncTime = Zotero.Sync.Data.Local.getLastSyncTime();
|
var lastSyncTime = Zotero.Sync.Data.Local.getLastSyncTime();
|
||||||
assert.isAbove(lastSyncTime, new Date().getTime() - 1000);
|
assert.isAbove(lastSyncTime.getTime(), new Date().getTime() - 2000);
|
||||||
assert.isBelow(lastSyncTime, new Date().getTime());
|
assert.isBelow(lastSyncTime.getTime(), new Date().getTime());
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue