aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/unittests.js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js/unittests.js')
-rw-r--r--lang/js/unittests.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/lang/js/unittests.js b/lang/js/unittests.js
index 6c0d1890..c437d599 100644
--- a/lang/js/unittests.js
+++ b/lang/js/unittests.js
@@ -130,7 +130,6 @@ function unittests (){
let test0 = toKeyIdArray(hp.valid_openpgplike);
expect(test0).to.be.an('array').with.lengthOf(1);
- console.log(test0);
expect(test0).to.include(
hp.valid_openpgplike.primaryKey.getFingerprint());
});
@@ -255,7 +254,7 @@ function unittests (){
expect(test0.isComplete).to.be.false;
});
- it('Message is complete after setting mandatoy data', function(){
+ it('Message is complete after setting mandatory data', function(){
let test0 = createMessage('encrypt');
test0.setParameter('data', mp.valid_encrypt_data);
test0.setParameter('keys', hp.validFingerprints);
@@ -263,6 +262,13 @@ function unittests (){
expect(test0.isComplete).to.be.true;
});
+ it('Message is not complete after mandatory data is empty', function(){
+ let test0 = createMessage('encrypt');
+ test0.setParameter('data', '');
+ test0.setParameter('keys', hp.validFingerprints);
+ expect(test0.isComplete).to.be.false;
+ });
+
it('Complete Message contains the data that was set', function(){
let test0 = createMessage('encrypt');
test0.setParameter('data', mp.valid_encrypt_data);
@@ -315,7 +321,6 @@ function unittests (){
});
});
- mocha.run();
}
export default {unittests}; \ No newline at end of file