Rename method
Esse commit está contido em:
+1
-1
@@ -17,7 +17,7 @@ exports.createUdpControl = function(options) {
|
||||
|
||||
exports.createPngStream = function(options) {
|
||||
var stream = new arDrone.PngStream(options);
|
||||
stream.start();
|
||||
stream.resume();
|
||||
return stream;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@ function PngStream(options) {
|
||||
this.readable = true;
|
||||
}
|
||||
|
||||
PngStream.prototype.start = function() {
|
||||
PngStream.prototype.resume = function() {
|
||||
};
|
||||
|
||||
@@ -6,13 +6,13 @@ var arDrone = require(common.root);
|
||||
|
||||
utest('main api', {
|
||||
before: function() {
|
||||
sinon.stub(arDrone.PngStream.prototype, 'start');
|
||||
sinon.stub(arDrone.PngStream.prototype, 'resume');
|
||||
sinon.stub(arDrone.UdpNavdataStream.prototype, 'resume');
|
||||
sinon.stub(arDrone.Client.prototype, 'resume');
|
||||
},
|
||||
|
||||
after: function() {
|
||||
arDrone.PngStream.prototype.start.restore();
|
||||
arDrone.PngStream.prototype.resume.restore();
|
||||
arDrone.UdpNavdataStream.prototype.resume.restore();
|
||||
arDrone.Client.prototype.resume.restore();
|
||||
},
|
||||
@@ -26,7 +26,7 @@ utest('main api', {
|
||||
'createPngStream': function() {
|
||||
var pngStream = arDrone.createPngStream();
|
||||
assert.ok(pngStream instanceof arDrone.PngStream);
|
||||
assert.equal(pngStream.start.callCount, 1);
|
||||
assert.equal(pngStream.resume.callCount, 1);
|
||||
},
|
||||
|
||||
'createUdpControl': function() {
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário