Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('cannot decrypt data encrypted and not shared with self', async () => {
const letterContents = ['Harder', 'Better', 'Faster', 'Stronger'];
const encryptor = await args.aliceLaptop.makeChunkEncryptor();
const encryptedChunks = [];
for (const word of letterContents)
encryptedChunks.push(await encryptor.encryptData(utils.fromString(word)));
const encryptedSeal = await encryptor.seal({ shareWithUsers: [bobId], shareWithSelf: false });
await expect(args.aliceLaptop.makeChunkEncryptor(encryptedSeal)).to.be.rejectedWith(errors.ResourceNotFound);
});