fix(tests): add comprehensive unit and async tests across Rust crates and TypeScript runtime
This commit is contained in:
35
test/test.classes.node.ts
Normal file
35
test/test.classes.node.ts
Normal 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();
|
||||
Reference in New Issue
Block a user