Files
remoteingress/test/test.classes.node.ts

36 lines
1.1 KiB
TypeScript

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();