diff options
author | Maximilian Krambach <[email protected]> | 2018-08-22 16:37:46 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-08-22 16:37:46 +0000 |
commit | f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd (patch) | |
tree | fc94d23b0abef3c9e7c73d8a0165262f16e575e7 /lang/js/BrowserTestExtension/tests/longRunningTests.js | |
parent | js: improve decryption performance (diff) | |
download | gpgme-f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd.tar.gz gpgme-f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd.zip |
js: make method parameters objects
--
* As requested by using parties, the options to be passed into the
methods are now objects, with the objects' properties better
describing what they do, and to avoid the need to type several nulls
in a method call if one wants the last parameter.
- src/Keyring.js, src/gpgme.js: Changed parameters and their
validations
- BrowserTest/*.js Had to adapt quite some calls to the new format
Diffstat (limited to 'lang/js/BrowserTestExtension/tests/longRunningTests.js')
-rw-r--r-- | lang/js/BrowserTestExtension/tests/longRunningTests.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lang/js/BrowserTestExtension/tests/longRunningTests.js b/lang/js/BrowserTestExtension/tests/longRunningTests.js index 240a6b93..1d710e31 100644 --- a/lang/js/BrowserTestExtension/tests/longRunningTests.js +++ b/lang/js/BrowserTestExtension/tests/longRunningTests.js @@ -38,18 +38,20 @@ describe('Long running Encryption/Decryption', function () { it('Successful encrypt/decrypt completely random data ' + (i+1) + '/100', function (done) { const data = bigString(2*1024*1024); - context.encrypt(data,good_fpr).then(function (answer){ - expect(answer).to.not.be.empty; - expect(answer.data).to.be.a('string'); - expect(answer.data).to.include('BEGIN PGP MESSAGE'); - expect(answer.data).to.include('END PGP MESSAGE'); - context.decrypt(answer.data).then(function (result){ - expect(result).to.not.be.empty; - expect(result.data).to.be.a('string'); - expect(result.data).to.equal(data); - done(); + context.encrypt({ data: data, publicKeys: good_fpr }) + .then(function (answer){ + expect(answer).to.not.be.empty; + expect(answer.data).to.be.a('string'); + expect(answer.data).to.include('BEGIN PGP MESSAGE'); + expect(answer.data).to.include('END PGP MESSAGE'); + context.decrypt({ data: answer.data }) + .then(function (result){ + expect(result).to.not.be.empty; + expect(result.data).to.be.a('string'); + expect(result.data).to.equal(data); + done(); + }); }); - }); }).timeout(15000); } |