[nes] Add test/socket.ts

This commit is contained in:
Niklas Wulf
2017-08-30 16:10:00 +02:00
parent e7e82f42fb
commit bdd079afbe
2 changed files with 18 additions and 1 deletions

16
types/nes/test/socket.ts Normal file
View File

@@ -0,0 +1,16 @@
// from https://github.com/hapijs/nes/blob/v6.4.3/lib/socket.js
import Nes = require('nes');
const socket: Nes.Socket = undefined;
const cb = () => { };
socket.disconnect(cb);
const s: string = socket.id;
const o: Object = socket.app;
const auth: Nes.SocketAuthObject = socket.auth;
const cb2 = (err?: any) => { };
socket.send('message', (err?: any) => { });
socket.publish('path', 'message', cb2);
socket.revoke('path', 'message', cb2);

View File

@@ -26,9 +26,10 @@
"test/route-authentication-server.ts",
"test/route-invocation-client.ts",
"test/route-invocation-server.ts",
"test/socket.ts",
"test/subscription-filter-client.ts",
"test/subscription-filter-server.ts",
"test/subscriptions-client.ts",
"test/subscriptions-server.ts"
]
}
}