Add hub package
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import { ShxHub } from '../ts/index.js';
|
||||
|
||||
tap.test('creates a hub snapshot', async () => {
|
||||
const hub = new ShxHub();
|
||||
await hub.start();
|
||||
const snapshot = hub.getSnapshot();
|
||||
expect(snapshot.devices.length).toBeGreaterThan(0);
|
||||
expect(snapshot.agents.length).toEqual(6);
|
||||
await hub.stop();
|
||||
});
|
||||
|
||||
export default tap.start();
|
||||
Reference in New Issue
Block a user