Skip to content

Commit

Permalink
t2 restore: stub Progress.prototype.tick in tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Sep 12, 2016
1 parent 96d5e20 commit 945eebb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/unit/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ exports['Tessel.prototype.restore'] = {
return Promise.resolve(this.images);
});
this.restore = this.sandbox.spy(Tessel.prototype, 'restore');
this.tick = this.sandbox.stub(Progress.prototype, 'tick');
this.tessel = TesselSimulator();

done();
},

Expand Down Expand Up @@ -340,6 +340,8 @@ exports['restore.bulkEraseFlash'] = {

this.transaction = this.sandbox.stub(restore, 'transaction', () => Promise.resolve());
this.waitTransactionComplete = this.sandbox.stub(restore, 'waitTransactionComplete', () => Promise.resolve());

this.tick = this.sandbox.stub(Progress.prototype, 'tick');
done();
},

Expand Down Expand Up @@ -398,6 +400,7 @@ exports['restore.flash'] = {
});
this.usb.epIn._mockdata = new Buffer('mockbuffer');

this.tick = this.sandbox.stub(Progress.prototype, 'tick');
this.expectedBuffer = new Buffer([0x00, 0x00, 0x00, 0x00, 0xFF]);
done();
},
Expand Down

0 comments on commit 945eebb

Please sign in to comment.