UNPKG

johnny-five

Version:

The JavaScript Robotics and Hardware Programming Framework. Use with: Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!

34 lines (29 loc) 659 B
var MockFirmata = require("./util/mock-firmata"), five = require("../lib/johnny-five.js"), Repl = require("../lib/repl"), Board = five.Board; exports["Repl"] = { setUp: function(done) { done(); }, tearDown: function(done) { Board.purge(); done(); }, repl: function(test) { var io = new MockFirmata(); var board = new Board({ io: io, debug: false }); test.expect(3); board.on("ready", function() { test.ok(this.repl === board.repl); test.ok(this.repl instanceof Repl); test.ok(this.repl.context); test.done(); }); io.emit("connect"); io.emit("ready"); }, };