smartnetwork/test/test.ping.ts
2022-02-17 00:18:23 +01:00

17 lines
503 B
TypeScript

import { tap, expect, expectAsync } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts';
let testSmartnetwork: smartnetwork.SmartNetwork;
tap.test('should create a vlid instance of SmartNetwork', async () => {
testSmartnetwork = new smartnetwork.SmartNetwork();
expect(testSmartnetwork).toBeInstanceOf(smartnetwork.SmartNetwork);
});
tap.test('should send a ping to Google', async () => {
expectAsync(testSmartnetwork.ping('https://lossless.com')).toBeTrue();
});
tap.start();