node-ipc/test/CI.js

68 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-07-03 07:35:02 +10:00
//TCP TESTS
import cmd from 'node-cmd';
import {run as TCPClientRun} from './TCP/client.js';
import {run as TCPServerRun} from './TCP/server.js';
2021-07-04 15:44:09 +10:00
import {run as UDPRun} from './UDP/client.js';
2021-07-04 17:12:00 +10:00
import {run as unixClientRun} from './unix/client.js';
2021-07-03 07:35:02 +10:00
function logOutput(name,err, data, stderr){
console.log(`
${name} OUTPUT
`);
console.log(err, data, stderr)
}
cmd.run(
'node ./test/TCP/TCPServer.js',
function(err, data, stderr){
logOutput('TCP SERVER',err, data, stderr)
}
);
cmd.run(
'node ./test/TCP/TCPClient.js',
function(err, data, stderr){
logOutput('TCP CLIENT',err, data, stderr)
}
);
2021-07-04 15:44:09 +10:00
cmd.run(
'node ./test/UDP/UDP4Server.js',
function(err, data, stderr){
logOutput('UDP4',err, data, stderr)
}
);
cmd.run(
'node ./test/UDP/UDP6Server.js',
function(err, data, stderr){
logOutput('UDP6',err, data, stderr)
}
);
2021-07-04 17:12:00 +10:00
cmd.run(
'node ./test/unix/unixServer.js',
function(err, data, stderr){
logOutput('unix/posix',err, data, stderr)
}
);
cmd.run(
'node ./test/unix/unixServerSync.js',
function(err, data, stderr){
logOutput('unix/posix sync',err, data, stderr)
}
);
2021-07-03 07:35:02 +10:00
await TCPClientRun();
await TCPServerRun();
2021-07-04 15:44:09 +10:00
await UDPRun();
2021-07-04 17:12:00 +10:00
await unixClientRun();