[SignalingServer] Optimize dependent modules
[platform/framework/web/wrtjs.git] / signaling_server / service / node_modules / backo2 / test / index.js
1
2 var Backoff = require('..');
3 var assert = require('assert');
4
5 describe('.duration()', function(){
6   it('should increase the backoff', function(){
7     var b = new Backoff;
8
9     assert(100 == b.duration());
10     assert(200 == b.duration());
11     assert(400 == b.duration());
12     assert(800 == b.duration());
13
14     b.reset();
15     assert(100 == b.duration());
16     assert(200 == b.duration());
17   })
18 })