From a376ad8762ecdb3a3d2a08d590dece1d703200bc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 26 Jul 2023 07:24:09 -0400 Subject: [PATCH] Don't close and reopen window during WebDAV tests With any luck this will fix the crashing we've been getting in CI. --- test/tests/webdavTest.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/test/tests/webdavTest.js b/test/tests/webdavTest.js index 0d18200465..336ad5d06f 100644 --- a/test/tests/webdavTest.js +++ b/test/tests/webdavTest.js @@ -123,10 +123,8 @@ describe("Zotero.Sync.Storage.Mode.WebDAV", function () { return engine; }) - afterEach(function* () { - var defer = new Zotero.Promise.defer(); - this.httpd.stop(() => defer.resolve()); - yield defer.promise; + afterEach(async function () { + await new Promise(request => this.httpd.stop(request)); }) after(function* () { @@ -141,14 +139,6 @@ describe("Zotero.Sync.Storage.Mode.WebDAV", function () { // Tests // describe("Syncing", function () { - beforeEach(function* () { - win = yield loadZoteroPane(); - }) - - afterEach(function () { - win.close(); - }) - it("should skip downloads if not marked as needed", function* () { var engine = yield setup();