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:
parent
d122323dbf
commit
995bc9667b
|
@ -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 () {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user