fix(package): modernize package configuration and stabilize ping typings and tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smartping from '../ts/index.js';
|
||||
|
||||
let testPing: smartping.Smartping;
|
||||
@@ -9,12 +9,12 @@ tap.test('should create an instance of Smartping', async () => {
|
||||
});
|
||||
|
||||
tap.test('should deliver a ping result', async () => {
|
||||
const result = await testPing.ping('lossless.com', 1000);
|
||||
console.log(result);
|
||||
})
|
||||
const result = await testPing.ping('127.0.0.1', 1);
|
||||
expect(result.alive).toBeTrue();
|
||||
});
|
||||
|
||||
tap.test('should detect alive', async () => {
|
||||
await expectAsync(testPing.pingAlive('lossless.com', 1000)).toBeTrue();
|
||||
})
|
||||
expect(await testPing.pingAlive('127.0.0.1', 1)).toBeTrue();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
Reference in New Issue
Block a user