smartping/test/test.ts

16 lines
450 B
TypeScript
Raw Normal View History

2022-10-20 06:24:20 +00:00
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartping from '../ts/index.js';
2018-11-18 14:06:17 +00:00
2022-10-21 09:55:42 +00:00
let testPing: smartping.Smartping;
tap.test('should create an instance of Smartping', async () => {
testPing = new smartping.Smartping();
expect(testPing).toBeInstanceOf(smartping.Smartping);
2022-10-20 06:24:20 +00:00
});
2018-11-18 14:06:17 +00:00
2022-10-21 09:55:42 +00:00
tap.test('should detect alive', async () => {
await expectAsync(testPing.pingAlive('lossless.com', 1000)).toBeTrue();
})
2022-10-20 06:24:20 +00:00
tap.start();