Get basic test up and passing

This replaces the 'ws' library with built-in websockets so that we can mock a server and successfully connect to it. A simple test verifies that Unit is handling a message request and response as we expect it to.
This commit is contained in:
2025-01-13 13:06:58 -06:00
parent 6c79e35e04
commit f8e2aa0f3e
10 changed files with 176 additions and 111 deletions

2
esm/unit.d.ts vendored
View File

@ -30,6 +30,8 @@ export declare class Unit extends EventEmitter {
* Connects to the specified unit and maintains a connection to it until `close()` is called.
*/
connect(): Promise<void>;
private onOpen;
private onError;
/**
* Closes the connection to the unit.
*/