update tests

This commit is contained in:
Philipp Kunz 2017-07-07 22:10:03 +02:00
parent 477429143d
commit dd31eea263

View File

@ -37,17 +37,15 @@ tap.test('should add a socketrole', async () => {
tap.test('should register a new Function', async () => { tap.test('should register a new Function', async () => {
testSocketFunction1 = new smartsocket.SocketFunction({ testSocketFunction1 = new smartsocket.SocketFunction({
funcName: 'testFunction1', funcName: 'testFunction1',
funcDef: (dataArg) => { funcDef: async (dataArg) => {
let done = smartq.defer() return dataArg
done.resolve(dataArg)
return done.promise
}, },
allowedRoles: [ testSocketRole1 ] allowedRoles: [ testSocketRole1 ]
}) })
}) })
// class SmartsocketClient // class SmartsocketClient
tap.test('should react to a new websocket connection from client',async () => { tap.test('should react to a new websocket connection from client', async () => {
let done = smartq.defer() let done = smartq.defer()
testSmartsocketClient = new smartsocket.SmartsocketClient({ testSmartsocketClient = new smartsocket.SmartsocketClient({
port: testConfig.port, port: testConfig.port,