-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some fixes were made such that bonescript.js can run via node.js. I haven't yet verified that it doesn't break the browser. An internal startClient function was created. Added a devDependency on socket.io-client.
- Loading branch information
Jason Kridner
committed
Jun 13, 2018
1 parent
a9ca418
commit 47454f7
Showing
4 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var server = require('../src/server'); | ||
var bonescript = require('../src/bonescript'); | ||
var serverEmitter = null; | ||
|
||
exports.setUp = function (callback) { | ||
server.serverStart(8000, process.cwd(), mycb); | ||
|
||
function mycb(emitter) { | ||
serverEmitter = emitter; | ||
bonescript.startClient('127.0.0.1', 8000, callback); | ||
} | ||
}; | ||
|
||
exports.testRPC1 = function (test) { | ||
test.expect(1); | ||
test.doesNotThrow(function () { | ||
console.log(bonescript); | ||
var b = bonescript.require('bonescript'); | ||
b.getPlatform(function (platform) { | ||
console.log('Name: ' + platform.name); | ||
console.log('Version: ' + platform.bonescript); | ||
}); | ||
}); | ||
test.done(); | ||
}; |