How to use the @tanker/core.statuses.STOPPED 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 / revocation.js View on Github external
it('will close a Tanker session on a device revoked while closed', async () => {
      const bobPhoneDeviceId = bobPhone.deviceId;
      await bobPhone.stop();
      await bobLaptop.revokeDevice(bobPhoneDeviceId);

      await bobPhone.start(bobIdentity);
      await expect(bobPhone.encrypt('message')).to.be.rejectedWith(errors.DeviceRevoked);
      expect(bobPhone.status).to.equal(statuses.STOPPED);
    });