add unit tests for RippleAPIBroadcast

This commit is contained in:
Ivan Tivonenko
2015-11-25 05:58:48 +02:00
parent 7626ea5ed8
commit ddf8fe5b1a
3 changed files with 116 additions and 28 deletions

View File

@@ -71,6 +71,7 @@ module.exports = function(port) {
};
mock.on('connection', function(conn) {
this.socket = conn;
conn.on('message', function(requestJSON) {
const request = JSON.parse(requestJSON);
mock.emit('request_' + request.command, request, conn);