smartkey/test/test.ts

21 lines
623 B
TypeScript
Raw Normal View History

2019-02-23 13:18:17 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
2019-02-23 14:53:18 +00:00
import * as smartkey from '../ts/index';
let testSmartkey: smartkey.SmartKey;
2019-02-23 13:18:17 +00:00
tap.test('first test', async () => {
2019-02-23 14:53:18 +00:00
testSmartkey = new smartkey.SmartKey();
expect(testSmartkey).to.be.instanceOf(smartkey.SmartKey);
});
tap.test('should create a valid keypair', async () => {
const keyPair = await testSmartkey.getKeypair();
expect(keyPair).to.be.instanceOf(smartkey.KeyPair);
console.log(keyPair.publicKey);
console.log(keyPair.privateKey);
console.log('note: these keys do not have any function, they are just a test ReferenceError.');
});
2019-02-23 13:18:17 +00:00
2019-02-23 14:53:18 +00:00
tap.start();