From 3fd6837fce9b339b8b09a800a969e0950e78250c Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 23 Aug 2018 12:15:59 +0200 Subject: js: use destructured option parameters -- * Adds to f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd and makes use of destructuring, allowing for defaults, and cleaning up the validation. --- lang/js/unittests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lang/js/unittests.js') 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'); -- cgit v1.2.3