How to use the @tanker/core.errors.InternalError 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 / encrypt.js View on Github external
it('throws when sharing with already claimed identity', async () => {
        await bobLaptop.encrypt(clearText, { shareWithUsers: [publicProvisionalIdentity] });

        const verificationCode = await args.appHelper.getVerificationCode(email);
        await aliceLaptop.verifyProvisionalIdentity({ email, verificationCode });

        await expect(bobLaptop.encrypt(clearText, { shareWithUsers: [publicProvisionalIdentity] })).to.be.rejectedWith(errors.InternalError);
      });