diff --git a/test/test-rpc.js b/test/test-rpc.js index 7313b7e7..1613bc9b 100644 --- a/test/test-rpc.js +++ b/test/test-rpc.js @@ -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) { @@ -216,9 +225,4 @@ exports.testRPC = function (test) { test.done(); } } - - function mycb(emitter) { - serverEmitter = emitter; - bonescript.startClient('127.0.0.1', 8000, getPlatformTest_previous); - } } \ No newline at end of file