rm variable reconnect time
This commit is contained in:
parent
deb3ac92d6
commit
be7e122b0a
4 changed files with 22 additions and 33 deletions
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue