Don't try to pull retractions list from server at startup during tests

This causes problems with filtered test runs, since the request is
cancelled and the long response gets dumped to the console, making the
test result hard to find.
This commit is contained in:
Dan Stillman 2020-01-16 17:06:30 -05:00
parent 3de54455f6
commit 48741100a5

View file

@ -90,7 +90,13 @@ Zotero.Retractions = {
// If no cache file or it was created with a different version, download list at startup
if (!this._cacheETag || this._cacheVersion != this._version) {
Zotero.Schema.schemaUpdatePromise.then(() => this.updateFromServer());
Zotero.Schema.schemaUpdatePromise.then(() => {
if (Zotero.test) {
Zotero.debug("Skipping retraction list download in test mode");
return;
}
this.updateFromServer();
});
}
},