Clean up initialization of attachments tests

This commit is contained in:
Dan Stillman 2015-06-01 20:03:40 -04:00
parent 67663497ec
commit 75bcfcb685

View file

@ -1,12 +1,10 @@
describe("Zotero.Attachments", function() { describe("Zotero.Attachments", function() {
var win; var win;
before(function () { before(function* () {
// Hidden browser, which requires a browser window, needed for charset detection // Hidden browser, which requires a browser window, needed for charset detection
// (until we figure out a better way) // (until we figure out a better way)
if (!Zotero.isStandalone) { win = yield loadBrowserWindow();
return loadBrowserWindow().then(window => win = window);
}
}); });
after(function () { after(function () {
if (win) { if (win) {