fix(package): modernize package configuration and stabilize ping typings and tests

This commit is contained in:
2026-05-01 21:44:49 +00:00
parent 2632bf2082
commit 1477ceda5d
12 changed files with 7001 additions and 17554 deletions
+7 -7
View File
@@ -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();