How to use the @tanker/core.errors.ResourceNotFound function in @tanker/core

To help you get started, we’ve selected a few @tanker/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TankerHQ / sdk-js / packages / functional-tests / src / chunkEncryptor.js View on Github external
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);
    });