fork-openpgpjs/test/general/index.js
larabr 7f37a8aaca
Add config parameter to top-level functions (#1241)
Refactor functions to take the configuration as a parameter.

This allows setting a config option for a single function call, whereas
setting `openpgp.config` could lead to concurrency-related issues when
multiple async function calls are made at the same time.

`openpgp.config` is used as default for unset config values in top-level
functions.
`openpgp.config` is used as default config object in low-level functions
(i.e., when calling a low-level function, it may be required to pass
`{ ...openpgp.config, modifiedConfig: modifiedValue }`).

Also,

- remove `config.rsaBlinding`: blinding is now always applied to RSA decryption
- remove `config.debug`: debugging mode can be enabled by setting
  `process.env.NODE_ENV = 'development'`
- remove `config.useNative`: native crypto is always used when available
2021-02-26 20:04:54 +01:00

22 lines
582 B
JavaScript

module.exports = () => describe('General', function () {
require('./util.js')();
require('./biginteger.js')();
require('./armor.js')();
require('./packet.js')();
require('./keyring.js')();
require('./signature.js')();
require('./key.js')();
require('./openpgp.js')();
require('./config.js')();
require('./hkp.js')();
require('./wkd.js')();
require('./oid.js')();
require('./ecc_nist.js')();
require('./ecc_secp256k1.js')();
require('./x25519.js')();
require('./brainpool.js')();
require('./decompression.js')();
require('./streaming.js')();
});