Make various collection methods synchronous

- Collection::getDescendents()
- Collections.getByLibrary()
- Collections.getByParent()

And various things that depend on those. (View with -w.)
This commit is contained in:
Dan Stillman 2016-03-25 18:40:47 -04:00
parent 7dfb62b8fc
commit 15a9fd5494
11 changed files with 275 additions and 237 deletions

View file

@ -16,7 +16,9 @@ describe("Zotero_File_Interface", function() {
testFile.append("allTypesAndFields.js");
yield win.Zotero_File_Interface.importFile(testFile);
let importedCollection = yield Zotero.Collections.getByLibrary(Zotero.Libraries.userLibraryID).filter(x => x.name == 'allTypesAndFields');
let importedCollection = Zotero.Collections.getByLibrary(
Zotero.Libraries.userLibraryID
).filter(x => x.name == 'allTypesAndFields');
assert.equal(importedCollection.length, 1);
let childItems = importedCollection[0].getChildItems();
let savedItems = {};