diff --git a/test/tests/hyphenationTest.js b/test/tests/hyphenationTest.js index 80cdce67da..2f58df8b88 100644 --- a/test/tests/hyphenationTest.js +++ b/test/tests/hyphenationTest.js @@ -1,8 +1,14 @@ describe("Hyphenation", function () { + let win; + + after(function() { + win.close(); + }); + it("should not cause a segfault", async function () { // Files in test/tests/data/ (resources://) can't be parsed as XUL/XHTML, so the data for this test is in // test/content/ (chrome://), which can - window.openDialog('chrome://zotero-unit/content/hyphenationTest.xhtml', 'test', 'chrome'); + win = window.openDialog('chrome://zotero-unit/content/hyphenationTest.xhtml', 'test', 'chrome'); await Zotero.Promise.delay(200); }); }); diff --git a/test/tests/preferences_syncTest.js b/test/tests/preferences_syncTest.js index d185a45c65..b61ae2a712 100644 --- a/test/tests/preferences_syncTest.js +++ b/test/tests/preferences_syncTest.js @@ -122,9 +122,6 @@ describe("Sync Preferences", function () { it("should clear sync errors from the toolbar after logging in", async function () { let win = await loadZoteroPane(); - after(function () { - win.close(); - }); let syncError = win.document.getElementById('zotero-tb-sync-error'); @@ -134,6 +131,8 @@ describe("Sync Preferences", function () { getAPIKeyFromCredentialsStub.resolves(apiResponse); await setCredentials("Username", "correctPassword"); assert.isTrue(syncError.hidden); + + win.close(); }); }) }) diff --git a/test/tests/readerTest.js b/test/tests/readerTest.js index 9edaa6cf65..c456133f12 100644 --- a/test/tests/readerTest.js +++ b/test/tests/readerTest.js @@ -9,6 +9,7 @@ describe("Reader", function () { }); after(function () { + win.Zotero_Tabs.closeAll(); win.close(); });