fix(tests): add comprehensive unit and async tests across Rust crates and TypeScript runtime

This commit is contained in:
2026-02-18 18:35:53 +00:00
parent 6fdc9ea918
commit 0459cd2af6
9 changed files with 890 additions and 1 deletions

35
test/test.classes.node.ts Normal file
View File

@@ -0,0 +1,35 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { EventEmitter } from 'events';
import { RemoteIngressHub, RemoteIngressEdge } from '../ts/index.js';
tap.test('RemoteIngressHub constructor does not throw', async () => {
const hub = new RemoteIngressHub();
expect(hub).toBeTruthy();
});
tap.test('RemoteIngressHub is instanceof EventEmitter', async () => {
const hub = new RemoteIngressHub();
expect(hub).toBeInstanceOf(EventEmitter);
});
tap.test('RemoteIngressHub.running is false before start', async () => {
const hub = new RemoteIngressHub();
expect(hub.running).toBeFalse();
});
tap.test('RemoteIngressEdge constructor does not throw', async () => {
const edge = new RemoteIngressEdge();
expect(edge).toBeTruthy();
});
tap.test('RemoteIngressEdge is instanceof EventEmitter', async () => {
const edge = new RemoteIngressEdge();
expect(edge).toBeInstanceOf(EventEmitter);
});
tap.test('RemoteIngressEdge.running is false before start', async () => {
const edge = new RemoteIngressEdge();
expect(edge.running).toBeFalse();
});
export default tap.start();