Fix intermittent error in FullText.getUnsyncedContent() test
This commit is contained in:
parent
18349b2232
commit
e3033b056e
|
@ -128,10 +128,12 @@ describe("Zotero.Fulltext", function () {
|
||||||
|
|
||||||
var data = yield Zotero.FullText.getUnsyncedContent(Zotero.Libraries.userLibraryID);
|
var data = yield Zotero.FullText.getUnsyncedContent(Zotero.Libraries.userLibraryID);
|
||||||
assert.lengthOf(data, 3);
|
assert.lengthOf(data, 3);
|
||||||
for (let i = toSync.length - 1; i >= 0 ; i--) {
|
let contents = toSync.map(x => x.content);
|
||||||
assert.equal(data[i].content, toSync[i].content);
|
for (let d of data) {
|
||||||
assert.equal(data[i].indexedChars, toSync[i].indexedChars);
|
let pos = contents.indexOf(d.content);
|
||||||
assert.equal(data[i].indexedPages, toSync[i].indexedPages);
|
assert.isAbove(pos, -1);
|
||||||
|
assert.equal(d.indexedChars, toSync[pos].indexedChars);
|
||||||
|
assert.equal(d.indexedPages, toSync[pos].indexedPages);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user