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

The tests work correctly in Epiphany, but not in the WebKit build, where the native X25519 implementation throws non-standard errors on importKey (DataError) and generateKey (OperationError). Patching this would be simply a matter of catching such errors and falling back to the JS implementation, but since only the CI WebKit build seems to be affected, we prefer not to relax fallback checks in the context of crypto operations without issues reported in the wild.
42 lines
1.4 KiB
JavaScript
42 lines
1.4 KiB
JavaScript
import { existsSync } from 'fs';
|
|
import { playwrightLauncher, playwright } from '@web/test-runner-playwright';
|
|
|
|
const sharedPlaywrightCIOptions = {
|
|
// createBrowserContext: ({ browser }) => browser.newContext({ ignoreHTTPSErrors: true }),
|
|
headless: true
|
|
};
|
|
export default {
|
|
nodeResolve: true, // to resolve npm module imports in `unittests.html`
|
|
files: './test/unittests.html',
|
|
protocol: 'http:',
|
|
hostname: '127.0.0.1',
|
|
testsStartTimeout: 45000,
|
|
browserStartTimeout: 120000,
|
|
testsFinishTimeout: 450000,
|
|
concurrentBrowsers: 3,
|
|
concurrency: 1, // see https://github.com/modernweb-dev/web/issues/2706
|
|
coverage: false,
|
|
groups: [
|
|
{ name: 'local' }, // group meant to be used with either --browser or --manual options via CLI
|
|
{
|
|
name: 'headless:ci',
|
|
browsers: [
|
|
playwrightLauncher({
|
|
...sharedPlaywrightCIOptions,
|
|
product: 'chromium'
|
|
}),
|
|
playwrightLauncher({
|
|
...sharedPlaywrightCIOptions,
|
|
product: 'firefox'
|
|
}),
|
|
// try setting up webkit, but ignore if not available
|
|
// (e.g. on ubuntu, where we don't want to test webkit as the WebCrypto X25519 implementation has issues)
|
|
existsSync(playwright.webkit.executablePath()) && playwrightLauncher({
|
|
...sharedPlaywrightCIOptions,
|
|
product: 'webkit'
|
|
})
|
|
].filter(Boolean)
|
|
}
|
|
]
|
|
};
|