rm variable reconnect time

This commit is contained in:
Matias Alejo Garcia 2014-06-09 19:35:30 -03:00
commit be7e122b0a
4 changed files with 22 additions and 33 deletions

View file

@ -238,23 +238,13 @@ describe('Wallet model', function() {
throw ();
});
it('call reconnect after interval', function(done) {
it.only('call reconnect after interval', function(done) {
var w = createW2();
var testTime = 1000;
var callCount = 0;
var cT = w.reconnectDelay;
var t = 0;
do {
callCount++;
t += cT;
cT *= 2;
} while (t < testTime);
var spy = sinon.spy(w, 'scheduleConnect');
w.netStart();
setTimeout(function() {
sinon.assert.callCount(spy, callCount);
sinon.assert.callCount(spy, 10);
done();
}, testTime);
});