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
+20
View File
@@ -0,0 +1,20 @@
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartping from '../ts/index.js';
let testPing: smartping.Smartping;
tap.test('should create an instance of Smartping', async () => {
testPing = new smartping.Smartping();
expect(testPing).toBeInstanceOf(smartping.Smartping);
});
tap.test('should deliver a ping result', async () => {
const result = await testPing.ping('127.0.0.1', 1);
expect(result.alive).toBeTrue();
});
tap.test('should detect alive', async () => {
expect(await testPing.pingAlive('127.0.0.1', 1)).toBeTrue();
});
export default tap.start();