Changeset View
Changeset View
Standalone View
Standalone View
web/olm/olm.test.js
// @flow | // @flow | ||||
import olm from '@commapp/olm'; | import olm from '@commapp/olm'; | ||||
describe('olm.Account', () => { | describe('olm.Account', () => { | ||||
it('should construct an empty olm.Account', async () => { | it('should construct an empty olm.Account', async () => { | ||||
await olm.init(); | await olm.init(); | ||||
const account = new olm.Account(); | const account = new olm.Account(); | ||||
expect(account).not.toBe(undefined); | expect(account).not.toBe(undefined); | ||||
}); | }); | ||||
it('should be able to generate and return prekey', async () => { | |||||
await olm.init(); | |||||
const account = new olm.Account(); | |||||
account.create(); | |||||
account.generate_prekey(); | |||||
expect(account.prekey()).not.toBe(undefined); | |||||
}); | |||||
}); | }); |