We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8315f4 commit 041a5ccCopy full SHA for 041a5cc
modules/encrypt-node/test/encrypt.test.ts
@@ -375,6 +375,15 @@ describe('encrypt structural testing', () => {
375
const plaintext = new Uint8Array()
376
const { result, messageHeader } = await encrypt(keyRing, plaintext)
377
378
+ /* The default algorithm suite will add a signature key to the context.
379
+ * So I only check that the passed context elements exist.
380
+ */
381
+ expect(messageHeader.encryptionContext)
382
+ .to.haveOwnProperty('simple')
383
+ .and.to.equal('context')
384
+ expect(messageHeader.encryptedDataKeys).lengthOf(1)
385
+ expect(messageHeader.encryptedDataKeys[0]).to.deep.equal(edk)
386
+
387
const headerInfo = deserializeMessageHeader(result)
388
if (!headerInfo) throw new Error('this should never happen')
389
0 commit comments