Remove trailing whitespace
This commit is contained in:
parent
7e3e24f84d
commit
cdd3f3310a
|
@ -13,7 +13,7 @@ require('./driver');
|
|||
var namespace = require('node-namespace');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }
|
||||
|
||||
|
||||
// The Artoo::Device class represents the interface to
|
||||
// a specific individual hardware devices. Examples would be a digital
|
||||
// thermometer connected to an Arduino, or a Sphero's accelerometer
|
||||
|
|
|
@ -330,7 +330,7 @@ namespace("Cylon", function() {
|
|||
} else {
|
||||
return realDriver;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Public: Requires module for a driver and adds it to @robot.drivers
|
||||
//
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('Basestar', function() {
|
|||
describe('#proxyMethods', function() {
|
||||
var ProxyClass, TestClass, methods;
|
||||
methods = ['asString', 'toString', 'returnString'];
|
||||
|
||||
|
||||
ProxyClass = (function() {
|
||||
function ProxyClass() {}
|
||||
|
||||
|
@ -33,7 +33,7 @@ describe('Basestar', function() {
|
|||
return ProxyClass;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
TestClass = (function(_super) {
|
||||
subclass(TestClass, _super);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ describe("Cylon", function() {
|
|||
robot.name.should.be.equal("caprica six");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("with an invalid robot name", function() {
|
||||
it("returns null", function() {
|
||||
var robot;
|
||||
|
@ -74,7 +74,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("async", function() {
|
||||
describe("with a valid robot name", function() {
|
||||
it("passes the robot and an empty error to the callback", function() {
|
||||
|
@ -85,7 +85,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("with an invalid robot name", function() {
|
||||
it("passes no robot and an error message to the callback", function() {
|
||||
return Cylon.findRobot("Tom Servo", function(error, robot) {
|
||||
|
@ -126,7 +126,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("async", function() {
|
||||
describe("with a valid robot and device name", function() {
|
||||
it("passes the device and an empty error to the callback", function() {
|
||||
|
@ -149,7 +149,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("#findRobotConnection", function() {
|
||||
var ultron;
|
||||
ultron = Cylon.robot({
|
||||
|
@ -159,7 +159,7 @@ describe("Cylon", function() {
|
|||
adaptor: 'loopback'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
describe("synchronous", function() {
|
||||
describe("with a valid robot and connection name", function() {
|
||||
it("returns the connection", function() {
|
||||
|
@ -178,7 +178,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("async", function() {
|
||||
describe("with a valid robot and connection name", function() {
|
||||
it("passes the connection and an empty error to the callback", function() {
|
||||
|
@ -189,7 +189,7 @@ describe("Cylon", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("with an invalid connection name", function() {
|
||||
it("passes no connection and an error message to the callback", function() {
|
||||
return Cylon.findRobotConnection("Ultron", "madethisup", function(err, conn) {
|
||||
|
|
|
@ -19,7 +19,7 @@ describe("Device", function() {
|
|||
});
|
||||
|
||||
initDriver = sinon.stub(robot, 'initDriver').returns(driver);
|
||||
|
||||
|
||||
device = new Cylon.Device({
|
||||
name: "devisive",
|
||||
driver: 'driving',
|
||||
|
@ -29,29 +29,29 @@ describe("Device", function() {
|
|||
it("belongs to a robot", function() {
|
||||
device.robot.name.should.be.equal('me');
|
||||
});
|
||||
|
||||
|
||||
it("has a name", function() {
|
||||
device.name.should.be.equal('devisive');
|
||||
});
|
||||
|
||||
|
||||
it("can init a driver", function() {
|
||||
initDriver.should.be.called;
|
||||
});
|
||||
|
||||
|
||||
it("can start a driver", function() {
|
||||
var driverStart;
|
||||
driverStart = sinon.stub(driver, 'start').returns(true);
|
||||
device.start();
|
||||
driverStart.should.be.called;
|
||||
});
|
||||
|
||||
|
||||
it("can stop a driver", function() {
|
||||
var driverStop;
|
||||
driverStop = sinon.stub(driver, 'stop').returns(true);
|
||||
device.stop();
|
||||
driverStop.should.be.called;
|
||||
});
|
||||
|
||||
|
||||
it("should use default connection if none specified");
|
||||
it("should use connection if one is specified");
|
||||
});
|
||||
|
|
|
@ -201,7 +201,7 @@ describe("DigitalPin", function() {
|
|||
return pin.digitalWrite.restore();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("#toggle", function() {
|
||||
context("when the pin is 'high'", function() {
|
||||
it("sets the pin to 'low'", function() {
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("Driver", function() {
|
|||
it("saves the provided name in the @name variable", function() {
|
||||
expect(driver.name).to.be.eql("TestDriver");
|
||||
});
|
||||
|
||||
|
||||
it("saves the provided device in the @device variable", function() {
|
||||
expect(driver.device).to.be.eql(device);
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Port", function() {
|
|||
describe("local TCP port", function() {
|
||||
var port;
|
||||
port = new Cylon.Port("5678");
|
||||
|
||||
|
||||
it("#port", function() {
|
||||
port.port.should.be.equal("5678");
|
||||
});
|
||||
|
@ -55,7 +55,7 @@ describe("Port", function() {
|
|||
describe("serial port", function() {
|
||||
var port;
|
||||
port = new Cylon.Port("/dev/tty.usb12345");
|
||||
|
||||
|
||||
it("#port", function() {
|
||||
port.port.should.be.equal("/dev/tty.usb12345");
|
||||
});
|
||||
|
@ -80,7 +80,7 @@ describe("Port", function() {
|
|||
describe("portless", function() {
|
||||
var port;
|
||||
port = new Cylon.Port;
|
||||
|
||||
|
||||
it("#port", function() {
|
||||
assert(port.port === void 0);
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ describe("Robot", function() {
|
|||
testWork = function() {
|
||||
return Logger.info("hi");
|
||||
};
|
||||
|
||||
|
||||
whateverFunc = function() {
|
||||
return Logger.info("whatever!");
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Utils", function() {
|
|||
describe("#proxyFunctionsToObject", function() {
|
||||
var ProxyClass, TestClass, methods;
|
||||
methods = ['asString', 'toString', 'returnString'];
|
||||
|
||||
|
||||
ProxyClass = (function() {
|
||||
function ProxyClass() {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue