openpgpjs/test/initOpenpgp.js
larabr ae4ed1fbf3 Tests: explicitly share openpgp instance used in tests
Also, init config before any code is run in tests
2023-10-25 12:53:10 +02:00

15 lines
402 B
JavaScript

/**
* This module centralises the openpgp import and ensures that the module is initialised
* at the top of the test bundle, and that the config is initialised before the tests code runs (incl. that outside of `describe`).
*/
import * as openpgp from 'openpgp';
if (typeof window !== 'undefined') {
window.openpgp = openpgp;
}
openpgp.config.s2kIterationCountByte = 0;
export default openpgp;