metarhia / metacom

RPC communication protocol for Metarhia stack 🔌
https://metarhia.com
MIT License
80 stars 40 forks source link

Client (server) tests #427

Closed mprudnik closed 1 year ago

mprudnik commented 1 year ago
tshemsedinov commented 1 year ago
       connection.on('message', (data, isBinary) => {
-        if (isBinary) this.binary(client, data);
+        if (isBinary) this.binary(client, new Uint8Array(data));
         else this.message(client, data);
       });
mprudnik commented 1 year ago

@tshemsedinov Tests are passing now. Could you please review how the tests are written before landing this PR? The idea was to use only client code to test it separately, create mock server for each case and run a basic success case scenario.

mprudnik commented 1 year ago

@tshemsedinov Yes, ready

tshemsedinov commented 1 year ago

@mprudnik Landed, Thanks!