diff options
author | Maximilian Krambach <[email protected]> | 2018-08-23 10:15:59 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-08-23 10:15:59 +0000 |
commit | 3fd6837fce9b339b8b09a800a969e0950e78250c (patch) | |
tree | af772f88219f65db55a77096d5aacd1ab0a2760f /lang/js/unittests.js | |
parent | js: update getDefaultKey to more precise logic (diff) | |
download | gpgme-3fd6837fce9b339b8b09a800a969e0950e78250c.tar.gz gpgme-3fd6837fce9b339b8b09a800a969e0950e78250c.zip |
js: use destructured option parameters
--
* Adds to f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd and makes use of
destructuring, allowing for defaults, and cleaning up the
validation.
Diffstat (limited to 'lang/js/unittests.js')
-rw-r--r-- | lang/js/unittests.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lang/js/unittests.js b/lang/js/unittests.js index 212effd3..8f1ffb66 100644 --- a/lang/js/unittests.js +++ b/lang/js/unittests.js @@ -262,7 +262,7 @@ function unittests (){ it('Loading Keys from Keyring, to be used synchronously', function (done){ let keyring = new GPGME_Keyring; - keyring.getKeys(null, true).then(function (result){ + keyring.getKeys({ prepare_sync: true }).then(function (result){ expect(result).to.be.an('array'); expect(result[0].get('hasSecret')).to.be.a('boolean'); done(); @@ -273,7 +273,9 @@ function unittests (){ it('Loading specific Key from Keyring, to be used synchronously', function (done){ let keyring = new GPGME_Keyring; - keyring.getKeys(kp.validKeyFingerprint, true).then( + keyring.getKeys({ + pattern: kp.validKeyFingerprint, + prepare_sync: true }).then( function (result){ expect(result).to.be.an('array'); expect(result[0].get('hasSecret')).to.be.a('boolean'); |