helium/test/test.ts

21 lines
647 B
TypeScript
Raw Normal View History

2022-02-11 16:49:12 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
import * as helium from '../ts/index';
let testHelium: helium.Helium;
tap.test('should create a valid helium class', async () => {
testHelium = new helium.Helium();
expect(testHelium).toBeInstanceOf(helium.Helium);
});
tap.test('should create and update a wallet', async () => {
const wallet = await testHelium.addWalletByAddress('13L7By1BmboTx1hRUuN3MtMjNmTFaWj5C6EbRZCK2sceaRCWZev');
console.log(wallet.earningsHnt24h);
console.log(wallet.earningsHnt7d);
console.log(wallet.earningsHnt14d);
console.log(wallet.earningsHnt30d);
console.log(wallet.hotspots);
})
tap.start();