new readme and some small fixes

This commit is contained in:
2020-03-18 03:17:31 +01:00
parent 7d580c4c23
commit 81e2115ad9
8 changed files with 526 additions and 132 deletions
+5 -5
View File
@@ -330,7 +330,7 @@ describe('Sesame should unlock the socket', () => {
it('should not work without sesame', (done) => {
const sock = new RPCSocket(21004, "localhost")
sock.connect<SesameTestIfc>( /* no sesame */).then(async (cli) => {
sock.connect( /* no sesame */).then(async (cli) => {
if (!cli.test)
done()
else {
@@ -343,7 +343,7 @@ describe('Sesame should unlock the socket', () => {
it('should fail with wrong sesame', (done) => {
const sock = new RPCSocket(21004, "localhost")
sock.connect<SesameTestIfc>('abasd').then(async (cli) => {
sock.connect('abasd').then(async (cli) => {
if (!cli.test)
done()
else {
@@ -586,8 +586,8 @@ describe("Class binding", () => {
})
beforeEach((done) => {
const s = new RPCSocket(21004, 'localhost')
s.connect<myExporterIfc>("xxx").then(conn => {
const s = new RPCSocket<myExporterIfc>(21004, 'localhost')
s.connect("xxx").then(conn => {
sock = conn
done()
})
@@ -645,7 +645,7 @@ describe("Class binding", () => {
describe("attaching handlers before connecting", () => {
it("fires error if server is unreachable", (done) => {
const sock = new RPCSocket(21004, 'localhost')
const sock = new RPCSocket<myExporterIfc>(21004, 'localhost')
let errorHandleCount = 0
sock.on('error', (err) => {