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