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