Components.utils.import("resource://gre/modules/osfile.jsm"); var EventUtils = Components.utils.import("resource://zotero-unit/EventUtils.jsm"); var ZoteroUnit = Components.classes["@mozilla.org/commandlinehandler/general-startup;1?type=zotero-unit"]. getService(Components.interfaces.nsISupports). wrappedJSObject; var dump = ZoteroUnit.dump; function quit(failed) { // Quit with exit status if(!failed) { OS.File.writeAtomic(OS.Path.join(OS.Constants.Path.profileDir, "success"), new Uint8Array(0)); } if(!ZoteroUnit.noquit) { setTimeout(function () { Components.classes['@mozilla.org/toolkit/app-startup;1'] .getService(Components.interfaces.nsIAppStartup) .quit(Components.interfaces.nsIAppStartup.eForceQuit); }, 250); } } if (ZoteroUnit.makeTestData) { let dataPath = getTestDataDirectory().path; Zotero.Prefs.set("export.citePaperJournalArticleURL", true); let dataFiles = [ { name: 'allTypesAndFields', func: generateAllTypesAndFieldsData }, { name: 'itemJSON', func: generateItemJSONData, args: [null] }, // { // name: 'citeProcJSExport', // func: generateCiteProcJSExportData // }, { name: 'translatorExportLegacy', func: generateTranslatorExportData, args: [true] }, { name: 'translatorExport', func: generateTranslatorExportData, args: [false] } ]; Zotero.Promise.coroutine(function* () { yield Zotero.initializationPromise; for (let i=0; i