Open a window for syncRunner tests

For some reason setTimeout in waitForWindow sometimes does not fire without a window open.
This commit is contained in:
Aurimas Vinckevicius 2015-09-18 02:20:56 -05:00
parent d122323dbf
commit 995bc9667b

View File

@ -148,9 +148,11 @@ describe("Zotero.Sync.Runner", function () {
// //
// Tests // Tests
// //
before(function () { let win;
before(function* () {
userLibraryID = Zotero.Libraries.userLibraryID; userLibraryID = Zotero.Libraries.userLibraryID;
publicationsLibraryID = Zotero.Libraries.publicationsLibraryID; publicationsLibraryID = Zotero.Libraries.publicationsLibraryID;
win = yield loadBrowserWindow();
}) })
beforeEach(function* () { beforeEach(function* () {
Zotero.HTTP.mock = sinon.FakeXMLHttpRequest; Zotero.HTTP.mock = sinon.FakeXMLHttpRequest;
@ -169,6 +171,9 @@ describe("Zotero.Sync.Runner", function () {
}) })
after(function () { after(function () {
Zotero.HTTP.mock = null; Zotero.HTTP.mock = null;
if (win) {
win.close();
}
}) })
describe("#checkAccess()", function () { describe("#checkAccess()", function () {