From 3d5967ec8af9b890afcd5fe8c7191f5d3ea34ea8 Mon Sep 17 00:00:00 2001 From: Brandon Nozaki Miller Date: Sun, 10 Jan 2016 01:18:57 -0800 Subject: [PATCH] UDP Socket client minor formatting fixes --- spec/support/jasmine.json | 4 ++- .../jasmineTest/UDP/udpSocketClient.spec.js | 32 +++++++++---------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json index 2c763b7..a065c4f 100644 --- a/spec/support/jasmine.json +++ b/spec/support/jasmine.json @@ -3,7 +3,9 @@ "spec_files": [ "/support/jasmineTest/testFile.js", - "/support/jasmineTest/Unix/unixSocketClient.spec.js" + "/support/jasmineTest/Unix/unixSocketClient.spec.js", + + "/support/jasmineTest/UDP/udpSocketClient.spec.js" ] diff --git a/spec/support/jasmineTest/UDP/udpSocketClient.spec.js b/spec/support/jasmineTest/UDP/udpSocketClient.spec.js index 8f4560a..8205640 100644 --- a/spec/support/jasmineTest/UDP/udpSocketClient.spec.js +++ b/spec/support/jasmineTest/UDP/udpSocketClient.spec.js @@ -8,36 +8,36 @@ ipc.config.retry = 600; describe( 'UDP Socket verification.', - function(){ + function testDescription(){ it( 'Verify UDP server of type udp4 connects to UDP server named "udp4Server" and receives message.', - function(done){ + function testIt(done){ ipc.serveNet( 8001, 'udp4', - function(){ + function serverStarted(){ ipc.server.on( 'message', - function(data,socket){ + function gotMessage(data,socket){ expect(data.id).toBe('udpServer'); expect(data.message).toBe('I am UDP4 server!'); done(); } ); - ipc.server.emit( - { - address : 'localhost', - port : ipc.config.networkPort - }, + ipc.server.emit( + { + address : 'localhost', + port : ipc.config.networkPort + }, 'message', - { - id : ipc.config.id, - message : 'I am testClient' - } + { + id : ipc.config.id, + message : 'I am testClient' + } ); - ipc.server.on( + ipc.server.on( 'error', function(err){ console.log('Error is: ', err); @@ -49,7 +49,7 @@ describe( } ); - it( + it( 'Verify UDP server of type udp6 connects to UDP server named "udp6Server" and receives message.', function(done){ @@ -65,7 +65,7 @@ describe( expect(data.message).toBe('I am UDP6 server!'); done(); } - ); + ); ipc.server.emit( {