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": [
"/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(
'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(
{