mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-03-30 15:08:32 +00:00

We were previously testing the webkit engine on Linux, which however relies on a different WebCrypto API implementation compared to the macOS version (behind Safari). Also, increase mocha timeouts, as the argon2 memory-heavy test takes longer in Firefox.
42 lines
1.0 KiB
HTML
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: 45000
|
|
});
|
|
|
|
// 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>
|