19 lines
663 B
TypeScript
19 lines
663 B
TypeScript
import { tap, expect, expectAsync } from '@pushrocks/tapbundle';
|
|
|
|
import * as smartnetwork from '../ts/index.js';
|
|
|
|
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();
|
|
expectAsync(testSmartnetwork.ping('https://notthere.lossless.com')).toBeTrue();
|
|
expectAsync(testSmartnetwork.ping('192.168.186.999')).toBeFalse();
|
|
});
|
|
|
|
tap.start();
|