aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/BrowserTestExtension/tests/startup.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-07-27 18:36:21 +0000
committerMaximilian Krambach <[email protected]>2018-07-27 18:36:21 +0000
commit94ee0988d4eaac27785de6efb7c19ca9976e1e9c (patch)
treeb9a06e35d1a2831cb0750177daa978314b9be481 /lang/js/BrowserTestExtension/tests/startup.js
parentjs: clean up test extension (diff)
downloadgpgme-94ee0988d4eaac27785de6efb7c19ca9976e1e9c.tar.gz
gpgme-94ee0988d4eaac27785de6efb7c19ca9976e1e9c.zip
js: change the write access for js class methods
-- * src/ [Connection, Error, Key, Keyring, MEssage, Signature, gpgmejs]: Functions and values that are not meant to be overwritten are now moved into their constructors, thus eliminating the possibility of overwrites after initialization. * Key: The mode of use (synchronous cached, or async promises) ivs now determined at initialization of that Key. The property Key.isAsync reflects this state. * unittests: fixed old Key syntax for testing. * Message.js isComplete is now a method and not a getter anymore. * Added some startup tests.
Diffstat (limited to 'lang/js/BrowserTestExtension/tests/startup.js')
-rw-r--r--lang/js/BrowserTestExtension/tests/startup.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/lang/js/BrowserTestExtension/tests/startup.js b/lang/js/BrowserTestExtension/tests/startup.js
index dae94025..1e2784d9 100644
--- a/lang/js/BrowserTestExtension/tests/startup.js
+++ b/lang/js/BrowserTestExtension/tests/startup.js
@@ -21,17 +21,28 @@
* Maximilian Krambach <[email protected]>
*/
-/* global describe, it, expect, Gpgmejs */
+/* global describe, it, expect, Gpgmejs, inputvalues */
describe('GPGME context', function(){
it('Starting a GpgME instance', function(done){
let prm = Gpgmejs.init();
+ const input = inputvalues.someInputParameter;
prm.then(
function(context){
expect(context).to.be.an('object');
expect(context.encrypt).to.be.a('function');
expect(context.decrypt).to.be.a('function');
+ expect(context.sign).to.be.a('function');
+ expect(context.verify).to.be.a('function');
+ context.Keyring = input;
+ expect(context.Keyring).to.be.an('object');
+ expect(context.Keyring).to.not.equal(input);
+ expect(context._Keyring).to.equal(context.Keyring);
+ expect(context.Keyring.getKeys).to.be.a('function');
+ expect(context.Keyring.getDefaultKey).to.be.a('function');
+ expect(context.Keyring.importKey).to.be.a('function');
+ expect(context.Keyring.generateKey).to.be.a('function');
done();
});
});
-});
+}); \ No newline at end of file