Skip to content

Commit

Permalink
neater fix for test-rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
vaishnavachath committed Jun 18, 2018
1 parent dafabd9 commit 57722e1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/test-rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ var server = require('../src/server');
var bonescript = require('../src/bonescript');
var serverEmitter = null;

exports.testRPC = function (test) {
exports.setUp = function (callback) {
server.serverStart(8000, process.cwd(), mycb);

function mycb(emitter) {
callback();
}
};

exports.testRPC_callbacks = function (test) {
test.expect(16);

bonescript.startClient('127.0.0.1', 8000, getPlatformTest_previous);

function getPlatformTest_previous() {
var b = bonescript.require('bonescript');
b.getPlatform(function (platform) {
Expand Down Expand Up @@ -216,9 +225,4 @@ exports.testRPC = function (test) {
test.done();
}
}

function mycb(emitter) {
serverEmitter = emitter;
bonescript.startClient('127.0.0.1', 8000, getPlatformTest_previous);
}
}

0 comments on commit 57722e1

Please sign in to comment.