From 59c809c943781889ff2eda5912d8988eae9144ef Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:32:54 +0200 Subject: [PATCH] CI: Browserstack: test only iOS latest and min supported version (iOS 14) Dropping Safari since Web Secure Sockets do not seem to work with the 'networkLogs' capability, which is in turn required for the HTTPS connection to work without insecure certs warnings. --- package.json | 2 +- test/unittests.html | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 71397ab0..fe2f311e 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "web-streams-polyfill": "^4.0.0" }, "overrides": { - "@web/dev-server-core": "npm:@openpgp/wtr-dev-server-core@0.7.3-patch.0" + "@web/dev-server-core": "npm:@openpgp/wtr-dev-server-core@0.7.3-patch.1" }, "repository": { "type": "git", diff --git a/test/unittests.html b/test/unittests.html index f8381f7e..23784b22 100644 --- a/test/unittests.html +++ b/test/unittests.html @@ -18,12 +18,19 @@ timeout: 30000 }); - await import('./lib/unittests-bundle.js'); - - // run the tests, and notify the test runner after finishing - mocha.run(() => { - sessionFinished(); - }); + // Safari 14 does not support top-level await + import('./lib/unittests-bundle.js') + .then(() => { + // run the tests, and notify the test runner after finishing + mocha.run(() => { + sessionFinished(); + }); + }) + .catch(err => { + console.error(err); + // notify the test runner about errors + sessionFailed(err); + }); } catch (error) { console.error(error); // notify the test runner about errors