UDP Socket client minor formatting fixes

This commit is contained in:
Brandon Nozaki Miller 2016-01-10 01:18:57 -08:00
parent ac94fb3312
commit 3d5967ec8a
2 changed files with 19 additions and 17 deletions

View file

@ -3,7 +3,9 @@
"spec_files": [ "spec_files": [
"/support/jasmineTest/testFile.js", "/support/jasmineTest/testFile.js",
"/support/jasmineTest/Unix/unixSocketClient.spec.js" "/support/jasmineTest/Unix/unixSocketClient.spec.js",
"/support/jasmineTest/UDP/udpSocketClient.spec.js"
] ]

View file

@ -8,36 +8,36 @@ ipc.config.retry = 600;
describe( describe(
'UDP Socket verification.', 'UDP Socket verification.',
function(){ function testDescription(){
it( it(
'Verify UDP server of type udp4 connects to UDP server named "udp4Server" and receives message.', 'Verify UDP server of type udp4 connects to UDP server named "udp4Server" and receives message.',
function(done){ function testIt(done){
ipc.serveNet( ipc.serveNet(
8001, 8001,
'udp4', 'udp4',
function(){ function serverStarted(){
ipc.server.on( ipc.server.on(
'message', 'message',
function(data,socket){ function gotMessage(data,socket){
expect(data.id).toBe('udpServer'); expect(data.id).toBe('udpServer');
expect(data.message).toBe('I am UDP4 server!'); expect(data.message).toBe('I am UDP4 server!');
done(); done();
} }
); );
ipc.server.emit( ipc.server.emit(
{ {
address : 'localhost', address : 'localhost',
port : ipc.config.networkPort port : ipc.config.networkPort
}, },
'message', 'message',
{ {
id : ipc.config.id, id : ipc.config.id,
message : 'I am testClient' message : 'I am testClient'
} }
); );
ipc.server.on( ipc.server.on(
'error', 'error',
function(err){ function(err){
console.log('Error is: ', 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.', 'Verify UDP server of type udp6 connects to UDP server named "udp6Server" and receives message.',
function(done){ function(done){
@ -65,7 +65,7 @@ describe(
expect(data.message).toBe('I am UDP6 server!'); expect(data.message).toBe('I am UDP6 server!');
done(); done();
} }
); );
ipc.server.emit( ipc.server.emit(
{ {