bobcat/test/test.nonci.ts
2022-02-25 20:36:44 +01:00

31 lines
848 B
TypeScript

import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import { Qenv } from '@pushrocks/qenv';
const testQenv = new Qenv('./', './.nogit');
import * as bobcat from '../ts/index';
let testBobcatManager: bobcat.BobcatManager;
let testBobcat: bobcat.Bobcat;
tap.test('first test', async () => {
testBobcatManager = new bobcat.BobcatManager();
expect(testBobcatManager).toBeInstanceOf(bobcat.BobcatManager);
});
tap.test('should add a Bobcat miner', async () => {
const bobcatAddresses = testQenv.getEnvVarOnDemand('BOBCATS').split(',');
console.log(bobcatAddresses);
for (const bobcatAddress of bobcatAddresses) {
await testBobcatManager.addBobcat(bobcatAddress);
}
});
tap.test('', async () => {
testBobcat = new bobcat.Bobcat('bobcat.bleu.de');
expect(testBobcat).toBeInstanceOf(bobcat.Bobcat);
})
tap.start();