openpgpjs/test/unittests.html
larabr 59c809c943 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.
2024-10-24 15:39:20 +02:00

42 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>OpenPGPJS Unit Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script type="module">
import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha';
try {
// setup mocha
mocha.setup({
ui: 'bdd',
timeout: 30000
});
// 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
sessionFailed(error);
}
</script>
</body>
</html>